Skip to content

Instantly share code, notes, and snippets.

@yuanmai
yuanmai / GIT Global Config
Created March 27, 2012 03:12 — forked from corbanb-snippets/GIT: Global Config
git globals and alias
# http://gitready.com/intermediate/2009/02/06/helpful-command-aliases.html
git config --global alias.rb rebase
git config --global alias.st status
git config --global alias.ci commit
git config --global alias.br branch
git config --global alias.co checkout
git config --global alias.df df
git config --global alias.lg log -p
@yuanmai
yuanmai / simplifier.clj
Created May 9, 2012 14:00 — forked from ck/simplifier.clj
A Simplifier for all Expressions
;; A Simplifier for all Expressions
;; Example:
;; (simplify '(* 1 (+ x (- y y)))) ;=> x
;; (simplify '(and a (and (and) b))) ;=> (and a b)
;; See section 4.4, "Syntactic Abstraction" of Norvig and Pitman's
;; "Tutorial on Good Lisp Programming Style":
;; http://norvig.com/luv-slides.ps
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
if (!maskLayer)
{
maskLayer = [CAGradientLayer layer];
CGColorRef outerColor = [UIColor colorWithWhite:1.0 alpha:1.0].CGColor;
CGColorRef innerColor = [UIColor colorWithWhite:1.0 alpha:0.0].CGColor;
#!/bin/sh
kill $(lsof -t -i :8080)
sudo tcpdump -i en0 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction