Skip to content

Instantly share code, notes, and snippets.

View JamieHouston's full-sized avatar

Jamie Houston JamieHouston

View GitHub Profile
@JamieHouston
JamieHouston / .git_ignore
Created December 22, 2011 05:29
git global ignore file for visual studio/windows
#OS junk files
[Tt]humbs.db
*.DS_Store
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.pch
*.vspscc
@JamieHouston
JamieHouston / gitsetup
Created December 31, 2011 23:33
git setup
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git config --global core.editor vim
git config --global merge.tool vimdiff
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
git config --global core.whitespace cr-at-eol
@JamieHouston
JamieHouston / jquery enter key
Created February 8, 2012 19:08
jquery check for enter key
$('#input_text').on('keyup', function(e){
if (e.keyCode == 13) doTheWork();
}
@JamieHouston
JamieHouston / Flashing Android Rom
Created February 29, 2012 23:11
Steps for flashing your Android to a new ROM
# Get <rom>.zip (like ICS or what not)
# Copy to sdcard
> adb push "c:\path\to\file" /sdcard/
from command prompt, type adb reboot fastboot
from phone choose wipe -> wipe user data/cache/dvorak
from phone return to developer menu -> flash zip menu -> choose zip from sdcard -> pick <rom>.zip
# if you get "Main Version if Older"
@JamieHouston
JamieHouston / dynamo
Created April 10, 2012 18:33
Dynamic class in python, instead of using a dictionary
# Dynamic class
# Instantiate with bla=Dyamic(x=1, y=2)
# then just set of call like bla.foo = True
class Dynamo:
__init__ = lambda self, **kw: setattr(self, '__dict__', kw)
@JamieHouston
JamieHouston / settings.py
Created May 4, 2012 19:22
Default settings for django project
from os.path import abspath, dirname, basename, join
ROOT_PATH = abspath(dirname(__file__))
PROJECT_NAME = basename(ROOT_PATH)
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
@JamieHouston
JamieHouston / Fixing Rezound
Created May 21, 2012 21:35
Rezound Android Don't Panic Guide
Stuck on bootloader/white screen/etc
download recovery img
http://forum.xda-developers.com/showthread.php?t=1339679
If phone is off, turn on with volume-down and power button
Get phone to usb flashboot (select fastboot from menu and hit power if it doesn't say it already)
Make sure phone is unlocked (http://htcdev.com)
@JamieHouston
JamieHouston / osx hosts
Created September 10, 2012 16:27
Edit Mac Hosts
sudo vim /private/etc/hosts
@JamieHouston
JamieHouston / android keytool
Created September 13, 2012 20:10
Export android key
keytool -list -keystore "keystore name" -v
@JamieHouston
JamieHouston / python webserver
Created October 29, 2012 23:25
Serve pages from a directory
python -m SimpleHTTPServer