Skip to content

Instantly share code, notes, and snippets.

@tombatron
tombatron / Moving On
Created August 30, 2012 11:08
You don't have to go home, but you can't stay here.
There comes a time in every developer's life when it's time to move on. Sometimes it's your choice, sometimes the choice is made for you, either way you're going. This post is about how I've dealt with both situations.
Your Choice
So you've decided it's time for you to move on.
There are a few questions that you need some solid answers to first.
Why are you leaving?
@tombatron
tombatron / all-pictures.js
Created August 24, 2012 02:39
Javascript fragment used to display all pictures on my baby's blog.
(function ($) {
"use strict";
var nextLinkRegex = /<a.* href='(.*)'>Older Posts<\/a>/g,
picturesRegex = /<a.*><img.*><\/a>/g,
$babyPictureList = $('#baby_pictures');
(function scrapePictures(url) {
var nextUrl = null;
@tombatron
tombatron / gist:2851183
Created June 1, 2012 10:58
Base tests for Google App Engine Projects (Python)
import os
import unittest
import xmlrpclib
from google.appengine.datastore import datastore_stub_util
from google.appengine.ext import testbed
from webtest.app import TestApp
import main
class TestingHighReplicationConsistencyPolicy(datastore_stub_util.BaseHighReplicationConsistencyPolicy):
def _ShouldApply(self, txn, meta_data):