Skip to content

Instantly share code, notes, and snippets.

@laughinghan
laughinghan / scanner.js
Last active August 29, 2015 14:05
scan that shit
var patterns = [];
(function (args) {
for (var i = 0; i < args.length; i++) {
if (!args[i]) continue;
var parts = args[i].source.split('::=');
var name = parts[0].trim();
var pattern = RegExp('^(?:' + parts[1].trim() + ')');
patterns.push([name, pattern]);
}
@laughinghan
laughinghan / heroku-ready_django_startproject.sh
Created September 7, 2011 08:51 — forked from tkopczuk/create_django_heroku_project.sh
Create a new Heroku-ready Django project
#!/bin/sh
PROJECT_NAME=$1
if [ -z "$PROJECT_NAME" ]; then
echo "Usage: heroku-ready_django_startproject.sh projectname"
exit
fi
mkdir $PROJECT_NAME