Skip to content

Instantly share code, notes, and snippets.

@yaph
yaph / jQueryfy Bookmarklet
Created May 14, 2010 14:10
jQueryfy Bookmarklet
javascript:var%20s=document.createElement('script');s.setAttribute('src',%20'http://code.jquery.com/jquery-latest.js');document.getElementsByTagName('body')[0].appendChild(s);alert('thank%20you%20for%20using%20jquery!');void(s);
@yaph
yaph / gist:134894
Created June 23, 2009 22:33
create a query string from a dictionary (pquery) as returned from cgi.parse_qs / urlparse.parse_qs when urllib.urlencode is not appropriate
# create a query string from a dictionary (pquery) as returned from
# cgi.parse_qs / urlparse.parse_qs when urllib.urlencode is not appropriate
query_string = '&'.join(
'='.join([key, pquery[key][0]]) for key in pquery
)