git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| ######################### | |
| # .gitignore file for Xcode4 and Xcode5 Source projects | |
| # | |
| # Apple bugs, waiting for Apple to fix/respond: | |
| # | |
| # 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
| # | |
| # Version 2.6 | |
| # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
| # |
| #define ApplicationDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate]) | |
| #define UserDefaults [NSUserDefaults standardUserDefaults] | |
| #define NotificationCenter [NSNotificationCenter defaultCenter] | |
| #define SharedApplication [UIApplication sharedApplication] | |
| #define Bundle [NSBundle mainBundle] | |
| #define MainScreen [UIScreen mainScreen] | |
| #define ShowNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = YES | |
| #define HideNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = NO | |
| #define NetworkActivityIndicatorVisible(x) [UIApplication sharedApplication].networkActivityIndicatorVisible = x | |
| #define NavBar self.navigationController.navigationBar |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
| # | |
| # uncrustify config file for objective-c and objective-c++ | |
| # | |
| indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs | |
| output_tab_size = 4 # new tab size | |
| indent_columns = output_tab_size | |
| indent_label = 2 # pos: absolute col, neg: relative column | |
| indent_align_assign = FALSE |
| ;; emacs configuration | |
| (push "/usr/local/bin" exec-path) | |
| (add-to-list 'load-path "~/.emacs.d") | |
| (setq make-backup-files nil) | |
| (setq auto-save-default nil) | |
| (setq-default tab-width 2) | |
| (setq-default indent-tabs-mode nil) | |
| (setq inhibit-startup-message t) |
| RegexKit.framework/Headers/RKRegex.h:79:38 Pointer to function type 'NSString *' may not be 'restrict' qualified | |
| // The `define restrict` is there because XCode doesn't want to compile | |
| // RegexKit with the restrict qualifiers. | |
| #define restrict | |
| #import <RegexKit/RegexKit.h> |
| ;;; js-beautify.el -- beautify some js code | |
| (defgroup js-beautify nil | |
| "Use jsbeautify to beautify some js" | |
| :group 'editing) | |
| (defcustom js-beautify-args "--jslint-happy --brace-style=end-expand --keep-array-indentation" | |
| "Arguments to pass to jsbeautify script" | |
| :type '(string) | |
| :group 'js-beautify) |
FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.
The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.