I hereby claim:
- I am ryanbraganza on github.
- I am ryanbraganza (https://keybase.io/ryanbraganza) on keybase.
- I have a public key ASBMNbM2SuuquqRXXZ5pizf9-cK3G82p9CmyKzcPXhfNTgo
To claim this, I am signing this object:
""" | |
Print entire url structure of a django app | |
""" | |
from django.core.management.base import BaseCommand | |
import sys | |
from django.core.urlresolvers import RegexURLResolver | |
from django.conf import settings |
import logging; l=logging.getLogger('django.db.backends');l.setLevel(logging.DEBUG);l.addHandler(logging.StreamHandler()) |
import code | |
code.InteractiveConsole(locals=locals()).interact() | |
# with completion.. | |
import readline | |
readline.parse_and_bind("tab: complete") |
#!/bin/bash | |
# tested in ubuntu 12.04 | |
# sudo apt-get install markdown | |
filename="/tmp/md-preview-`date +%Y%m%d%H%M%S_%N`" | |
markdown $1 > "$filename" | |
firefox "$filename" & |
set shellcmdflag=-O\ expand_aliases\ -lc | |
set shellcmdflag=-c |
from django.core.management.base import BaseCommand, CommandError | |
from optparse import make_option | |
class Command(BaseCommand): | |
args = "<how many times to say hi to cindy>" | |
help = "Says hi to Cindy" | |
option_list = BaseCommand.option_list + ( | |
make_option('--with-smily-face', |
# select entire file | |
# filter through column (separator: s, pretty-print to a table) | |
ggvG:!column -s, -t |
module Deferredness | |
def defer phrase | |
thread = Thread.new do | |
sleep 0.0001 # FIXME hax | |
puts ' if ' + phrase | |
end | |
threads << thread.run | |
end | |
def await |
#!/usr/bin/env ruby | |
# Usage: | |
# | |
# ruby connect4.rb test # run the tests | |
# ruby connect4.rb play # launch a CLI-based game | |
# ruby connect4.rb # Simulate a simple game | |
require 'set' | |
PLAYER_ONE = 'X' |
I hereby claim:
To claim this, I am signing this object: