Skip to content

Instantly share code, notes, and snippets.

@joeshaw
joeshaw / gist:1efa84954539eb72d66f7520a4ca9569
Last active September 13, 2016 18:41
partial .gitconfig
[alias]
find = !sh -c 'git ls-files |grep --color=auto -i "$@" |less -FRSX' -
fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
squash = "!f() { TARGET=$(git rev-parse "$1"); git commit --squash=$TARGET ${@:2} && git rebase -i --autostash --autosquash $TARGET^; }; f"
ri = rebase --interactive --autosquash --autostash
lt = log --graph --pretty=changes
ll = log --numstat --pretty=changes
ds = diff --staged
ego = shortlog -s -n --no-merges
pr = pull-request
@joeshaw
joeshaw / proxy_views.py
Created September 20, 2011 17:47
super-hacky flask proxy
# coding:utf-8
# Copyright 2011 litl, LLC. All Rights Reserved.
import httplib
import re
import urllib
import urlparse
from flask import Blueprint, request, Response, url_for
from werkzeug.datastructures import Headers