[Pharo-dev] Checking your Gravatar

phil at highoctane.be phil at highoctane.be
Tue Aug 13 08:47:36 EDT 2013


you can by shift clicking around

On Tuesday, August 13, 2013, Mariano Martinez Peck <marianopeck at gmail.com>
wrote:
> This one is more fun
> (ImageMorph fromStream:(
>   ZnClient new
>     beOneShot;
>     url: 'http://www.gravatar.com/avatar';
>     addPathSegment: (ZnDigestAuthenticator md5Hash: 'marianopeck at gmail.com
');
>     queryAt: #s put: '128';
>     queryAt: #d put: '404';
>     get) readStream) openInWorld
>
> uhhh but I cannot remove the morph from the world....damn it!
>
> On Mon, Aug 12, 2013 at 7:46 PM, Sven Van Caekenberghe <sven at stfx.eu>
wrote:
>>
>> Hi,
>>
>> Related to the usage of Gravatars (http://en.wikipedia.org/wiki/Gravatar)
for http://contributors.pharo.org here is some code you can use to check
whether your Gravatar image really works:
>>
>> ZnClient new
>>   beOneShot;
>>   url: 'http://www.gravatar.com/avatar';
>>   addPathSegment: (ZnDigestAuthenticator md5Hash: 'sven at stfx.eu');
>>   queryAt: #s put: '128';
>>   queryAt: #d put: '404';
>>   get;
>>   isSuccess.
>>
>> ZnClient new
>>   beOneShot;
>>   url: 'http://www.gravatar.com/avatar';
>>   addPathSegment: (ZnDigestAuthenticator md5Hash: '
nobody.at.all at gmail.com');
>>   queryAt: #s put: '128';
>>   queryAt: #d put: '404';
>>   get;
>>   isSuccess.
>>
>> (ZnClient new
>>   enforceHttpSuccess: true;
>>   beOneShot;
>>   url: 'http://www.gravatar.com/avatar';
>>   addPathSegment: (ZnDigestAuthenticator md5Hash: 'tudor at tudorgirba.com
');
>>   queryAt: #s put: '128';
>>   queryAt: #d put: '404';
>>   contentReader: [ :entity | ImageMorph fromStream: entity readStream ];
>>   get) openInWindow.
>>
>> And now you know how simple Gravatars really are, provided you use a
proper programming language to access them.
>>
>> Enjoy!
>>
>> Sven
>>
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>

-- 
---
Philippe Back
Dramatic Performance Improvements
Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
Mail:phil at highoctane.be | Web: http://philippeback.eu
Blog: http://philippeback.be | Twitter: @philippeback
Youtube: http://www.youtube.com/user/philippeback/videos

High Octane SPRL
rue cour Boisacq 101 | 1301 Bierges | Belgium

Featured on the Software Process and Measurement Cast
http://spamcast.libsyn.com
Sparx Systems Enterprise Architect and Ability Engineering EADocX Value
Added Reseller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20130813/c51defad/attachment-0002.html>


More information about the Pharo-dev mailing list