Skip to content

Instantly share code, notes, and snippets.

View zhen9ao's full-sized avatar

Jack Gao zhen9ao

View GitHub Profile
git diff --no-prefix --ignore-space-at-eol | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" > changes.patch
@zhen9ao
zhen9ao / 0_reuse_code.js
Created May 31, 2016 03:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@zhen9ao
zhen9ao / # gcc49 - 2016-05-16_23-03-15.txt
Created May 16, 2016 15:05
gcc49 (homebrew/versions/gcc49) on Mac OS X 10.11.4 - Homebrew build logs
Homebrew build logs for homebrew/versions/gcc49 on Mac OS X 10.11.4
Build date: 2016-05-16 23:03:15
@zhen9ao
zhen9ao / Install_tmux
Created March 14, 2016 15:59 — forked from simme/Install_tmux
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@zhen9ao
zhen9ao / gist:4224532
Created December 6, 2012 13:44
dnsmasq.china.conf
# Google China hosts, use at your own risk
#address=/ggpht.com/203.208.46.29
#address=/googleusercontent.com/203.208.46.29
#address=/gstatic.com/203.208.46.29
#address=/google.com.hk/203.208.46.29
#address=/google.com/203.208.46.29
#address=/youtube.com/203.208.46.29
#address=/ytimg.com/203.208.46.29
server=/115.com/114.114.114.114
@zhen9ao
zhen9ao / autoproxy.pac
Created October 8, 2012 03:08
PAC file
var direct = 'DIRECT';
//var http_proxy = 'SOCKS5 127.0.0.1:7777; SOCKS 127.0.0.1:7777';
var http_proxy = 'PROXY 127.0.0.1:8087';
var gfwed_list = [
"adzerk.net",
"akamai.net",
"akamaihd.net",
"amazon.com",
"appspot.com",
@zhen9ao
zhen9ao / gist:3549851
Created August 31, 2012 07:21
Custom View Controller Transition
@implementation SwipSegue
- (void)perform
{
UIViewController *dest = (UIViewController *)self.destinationViewController;
UIViewController *source = (UIViewController *)self.sourceViewController;
// 先present,然后再做ViewAnimation,这样View的Callbacks就调用正常了。
[source presentViewController:dest animated:NO completion:nil];