Skip to content

Instantly share code, notes, and snippets.

Avatar

William Entriken fulldecent

View GitHub Profile
@carlo
carlo / google-img-resize.mdown
Last active Oct 14, 2020
Google’s authentication-less on-the-fly image resizing service
View google-img-resize.mdown

Google's authentication-less on-the-fly image resizing service

I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!

(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)

@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@evanshajed
evanshajed / bootstrap-alert-mail-check.js
Created May 3, 2012
Bootstrap JQuery Instant Mail Check Snippet
View bootstrap-alert-mail-check.js
/* Bootstrap Alert snippet for JQuery Mail Check plugin.
Read More about JQuery Mail Check plugin: http://github.com/Kicksend/mailcheck/
Add mailcheck.js first before using this snippet....
*/
bootstrap_alert = function() {}
bootstrap_alert.warning = function(message) {
$('#alert_placeholder').html('<div class="alert alert-info fade in"><a class="close" data-dismiss="alert">×</a><strong>Are you typing '+message+'?</strong></div>')
@jcsrb
jcsrb / gist:1081548
Created Jul 13, 2011
get avatar from google profiles, facebook, gravatar, twitter, tumblr
View gist:1081548
function get_avatar_from_service(service, userid, size) {
// this return the url that redirects to the according user image/avatar/profile picture
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px )
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word )
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word )
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px )
// everything else will go to the fallback
// google and gravatar scale the avatar to any site, others will guided to the next best version
You can’t perform that action at this time.