Instantly share code, notes, and snippets.

View gist:8994424
* A proxy for loading static files in development. Django doesn't handle this well.
* To run, do something like:
* npm install .
* node proxy.js --docroot=$PWD
* Then just visit http://localhost:9000/ as you normally would.
var httpProxy = require('http-proxy');
View gist:9116933

So I was writing an article on screen scraping and one of the things that came up is "How do you mitigate against screen scraping?" I think this is actually in interesting question, which brought up the idea of a side project that maybe someone else has time for.

The idea is that to prevent screen scraping, the page being scraped must be mutated as to break a scraper. To do that, you could do things like alter selectors of css resources and html (for instance, changing all ids of "signupButton" to "sarah-goldfarb") or change the structure of the page. Maybe it also mutates the structure of the DOM.

A small node proxy that does this around streams would be particularly cool.

Things you're likely to learn:

  1. More about CSS selector precedence. Which selectors can you easily mutate? Which are harder? Are there examples of selectors which you can't mutate?
  2. What can XPath do? XPath is a mechanism for querying tree structures (notably XML). If you were g

Keybase proof

I hereby claim:

  • I am justinabrahms on github.
  • I am justinabrahms ( on keybase.
  • I have a public key whose fingerprint is E0B7 AA7C 81E5 BEC7 991E FA4E 320E 47C9 795A D0D6

To claim this, I am signing this object:

View gist:10015289

April 11 -- Day 1

  • 10:50 -- Computer Science fundamentals for self-taught programmers (my talk)
  • 11:30: Creating bomb-proof data importers
  • 12:10:
  • 1:40/1:55: The Birth & Death of Javascript -- Gary is a fantastic speaker.
  • 2:35:
  • 3:15: Getting Started with SaltStack OR What is Async
  • 4:15/4:30: Maybe Castle Anthrax. Maybe Distributed Computing.
  • 5:10: Python + Geographic Data = BFFs (Support for fellow Portlanders!)
View gist:5a29d7e74e0620e23f08

(Classic Translation)

Of my grandfather Verus I have learned to be gentle and meek, and to refrain from all anger and passion.

From the fame and memory of him that begot me I have learned both shamefastness and manlike behaviour. Of

my mother I have learned to be religious, and bountiful; and to forbear, not only to do, but to intend any evil; to content myself with a spare diet, and to

View git-stash-grep
for i in `git stash list --format="%gd"`; do
git stash show -p $i | grep -H --label="$i" "$1"
View gist:bdcbc7a2da010d7aff6e
from pyquery import PyQuery
import requests
from random import choice
url = ''
query = 'td table tr'
def main():
View gist:40c256ce2548da2d6e79
def do_sprintly_automated_deploy(role, current_build, build_number):
Find what tickets were in this deploy and mark them as deployed in Sprintly.
if not settings.GITHUB_PERSONAL_TOKEN or not settings.SPRINTLY_API_KEY \
or not settings.SPRINTLY_EMAIL:
print 'Missing required settings for automated deploy.'

Code Review

A guide for reviewing code and having your code reviewed.

Peer code reviews are the single biggest thing you can do to improve your code - Jeff Atwood


Code review is an important part of a team's development process. It helps to:

  • disseminate knowledge about the codebase/technology/techniques across teams
  • increase awareness of the features being developed
View Broken link counter