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:
| # To Setup: | |
| # 1) Save the .git-completion.bash file found here: | |
| # https://github.com/git/git/blob/master/contrib/completion/git-completion.bash | |
| # 2) Add the following lines to your .bash_profile, be sure to reload (for example: source ~/.bash_profile) for the changes to take effect: | |
| # Git branch bash completion | |
| if [ -f ~/.git-completion.bash ]; then | |
| . ~/.git-completion.bash | |
| # Add git completion to aliases |
I hereby claim:
To claim this, I am signing this object:
| #!/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' |
| module Deferredness | |
| def defer phrase | |
| thread = Thread.new do | |
| sleep 0.0001 # FIXME hax | |
| puts ' if ' + phrase | |
| end | |
| threads << thread.run | |
| end | |
| def await |
| # select entire file | |
| # filter through column (separator: s, pretty-print to a table) | |
| ggvG:!column -s, -t |
| 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', |
| set shellcmdflag=-O\ expand_aliases\ -lc | |
| set shellcmdflag=-c |
| #!/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" & |
| import code | |
| code.InteractiveConsole(locals=locals()).interact() | |
| # with completion.. | |
| import readline | |
| readline.parse_and_bind("tab: complete") |
| import logging; l=logging.getLogger('django.db.backends');l.setLevel(logging.DEBUG);l.addHandler(logging.StreamHandler()) |