Skip to content

Instantly share code, notes, and snippets.

@dvschultz
dvschultz / gist:7360953
Created November 7, 2013 20:02
ibooks javascript to determine which device you’re using ibooks on #eprdctn
$(document).ready(function() {
(function(){
//cache variables
var iw = $('html').width(),
wh = screen.height;
alert('screen height: '+ wh +', inner-width: ' + iw);
if (wh == 768 || wh == 1024) {
@JohnStuartRutledge
JohnStuartRutledge / python_idioms.md
Last active February 23, 2023 09:56
A gist for tracking examples of idiomatic Python. The goal is to accrue a list of concrete examples to help develop an intuition of what constitutes "Pythonic" code.
@didip
didip / tornado_cookie_secret_generator.py
Created February 12, 2011 17:20
Generates secure cookie secret for Tornado Web Framework