Skip to content

Instantly share code, notes, and snippets.

View kevin-snippet's full-sized avatar

Kevin kevin-snippet

View GitHub Profile
@kevin-snippet
kevin-snippet / hidpi.txt
Created November 16, 2015 03:44 — forked from simX/hidpi.txt
Enable HiDPI mode in Mountain Lion w/o Quartz Debug
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.
@kevin-snippet
kevin-snippet / Raymond Hettinger's Pythonic Codes.md
Last active January 29, 2022 19:29 — forked from JeffPaine/beautiful_idiomatic_python.md
Raymond Hettinger's Pythonic Codes

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
    print i**2