Skip to content

Instantly share code, notes, and snippets.

View bobthecow's full-sized avatar

Justin Hileman bobthecow

View GitHub Profile
>>>True,False=False,True
>>>False
True
>>>1==2
False
>>>(1==2)==True
True
IIIIIIIIIIIIIIIPHP Fatal error: Symfony\Component\Routing\Router::needsReload(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Symfony\Components\Routing\FileResource" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /Users/justin/projects/www/vendor/symfony/src/Symfony/Component/Routing/Router.php on line 230
Fatal error: Symfony\Component\Routing\Router::needsReload(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Symfony\Components\Routing\FileResource" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /Users/justin/projects/www/vendor/symfony/src/Symfony/Component/Routing/Router.php on line 230
You learned to use a pastebin? Your mom would be so proud!
@bobthecow
bobthecow / .gitconfig
Created July 6, 2010 00:56
`git todo` alias is the hotness.
[alias]
# install t first: http://github.com/sjl/t
todo = !python ~/path/to/t.py --task-dir "$(git rev-parse --show-toplevel)" --list TODO
bug = !python ~/path/to/t.py --task-dir "$(git rev-parse --show-toplevel)" --list BUGS
<a href="{% route 'product_sellable' with ["sellerName": activity.sellable.seller.identity.username , "productSlug": activity.sellable.product.slug] %}">
<img src="{{ activity.sellable.product.images[0].thumbUrl }}">
</a>
@bobthecow
bobthecow / cdd.bash
Created June 21, 2010 23:37
Change directories really fast
#!/bin/bash
#
# Change directories really really fast
#
# Author: Justin Hileman (http://justinhileman.com)
#
# Installation:
# Add the following function to your `.bashrc` or `.bash_profile`,
# or save it somewhere (e.g. `~/.cdd.bash`) and source it in `.bashrc`
#
@bobthecow
bobthecow / untitled.txt
Created June 16, 2010 17:07
homebrew compile args for php 5.3 (work in progress)
# homebrew compile args for php 5.3 (work in progress)
"--prefix=#{prefix}",
"--mandir=#{man}",
"--infodir=#{info}",
"--disable-dependency-tracking",
"--sysconfdir=/private/etc",
"--with-apxs2=/usr/sbin/apxs",
"--enable-cli",
"--with-config-file-path=/etc",
merge.tool=chdiff
mergetool.chdiff.cmd=/usr/bin/env chdiff --wait $LOCAL $REMOTE
mergetool.chdiff.keepbackup=false
mergetool.chdiff.trustexitcode=false
diff.tool=Kaleidoscope
difftool.Kaleidoscope.cmd=ksdiff-wrapper git "$LOCAL" "$REMOTE"
difftool.prompt=false
@bobthecow
bobthecow / .gitconfig
Created June 10, 2010 15:30
Git aliases
[alias]
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; $EDITOR `f`"
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
lc = log ORIG_HEAD.. --stat --no-merges
smash = merge --no-commit --log
eat = branch -M
prune-all = !git remote | xargs -n 1 git remote prune
whois = "!sh -c 'git log -i --pretty=\"format:%an <%ae>\" --author=\"$1\" | sort -u' -"
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
#!/usr/bin/env python
""" TapDat - Simple VPN Setup.
"""
import re
import sys
from commands import getoutput as cmd
def main():