Post to Facebook on Behalf of Your User with Python/Django

Posting on facebook through python is fairly simple: you need acquire your user’s facebook access token, which you use to access the users facebook wall. Step 1: Create the facebook app First, create a new facebook app on and note down the APP_ID and APP_SECRET. Store this information in your django file. Step […]

Crop your images with CSS!

Instead of tracking down your language’s fancy image libraries, you can crop images very quickly with css. Simply use negative absolute positioning! HTML: CSS: If you don’t know the size of the image beforehand, you can use some javascript to compute the height and width:

Setting up iOS Push Notifications (APNS) with Python/Django through pyapns

Working with iOS for the first time can be a bit frustrating. For me, the most frustrating part was working with┬á Here I hope to help make push notifications with Python as painless as possible. Step 1: Enable for Apple Push Notification service and generate a certificate To get started, log in to you developer […]

How to Make a Bootable Linux USB on Mac OS X

I’ve tried using disk utility and didn’t seem to get anywhere. Using linux’s dd command seems to work best. Step 1. Open up the Terminal app and enter in: diskutil list Figure out what your usb device is called – mine was called /dev/disk1. Step 2. Unmount the disk: diskutil unmountDisk /dev/disk1 Step 3. Copy […]

The Python or Operator Shortcut

If statements are one of the most basic concepts used in all programming languages. Unfortunately they also make code ugly, unreadable, and sometimes even inefficient. Check out this google talk on if statements: Using the or operator we can avoid ifs when checking for null values before assignment: Traditional if: Using the or operator: