Skip to content

Instantly share code, notes, and snippets.

View ryanniemeyer's full-sized avatar

Ryan Niemeyer ryanniemeyer

View GitHub Profile
@ryanniemeyer
ryanniemeyer / org.memcached.plist
Created February 26, 2014 20:40
Memcached launchd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>memcached</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/memcached</string>
<string>-d</string>
@ryanniemeyer
ryanniemeyer / cloudfront_invalidate.py
Created February 6, 2013 04:46
Invalidate CloudFront paths from a CloudFront distribution using boto.
# -*- coding: utf-8 -*-
"""
Simple program for invalidating paths in a CloudFront distribution.
The AWS web console allows you to do this if you know the paths,
but sometimes you've got to find the paths from your database or some
other means that's too burdensome to copy/paste into a web form.
To run...
@ryanniemeyer
ryanniemeyer / gist:2967728
Created June 21, 2012 18:49
Installing PIL in virtualenvs

Update:

@thatmattbone gave a tweet that led me to Pillow, a fork of PIL that's much simpler to install. Only change I had to make was imports. I had been importing just "Image" and needed to change to "PIL.Image". Installing Pil(low) in a virtual env is now a piece of cake:

pip install Pillow

Before Pillow, this is what I was doing...

Mac OS X