Skip to content

Instantly share code, notes, and snippets.

@yuanmai
Last active February 8, 2017 08:25
Show Gist options
  • Save yuanmai/7364481 to your computer and use it in GitHub Desktop.
Save yuanmai/7364481 to your computer and use it in GitHub Desktop.

Install

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
  • Cocoapods
sudo gem install cocoapods
  • Node
brew install node
npm install -g less
curl -sk https://cloud.github.com/downloads/square/PonyDebugger/bootstrap-ponyd.py | \
  python - --ponyd-symlink=/usr/local/bin/ponyd ~/Library/PonyDebugger

ponyd serve --listen-interface=127.0.0.1

Git XCode

  • Use git sha1 as version number
HEAD=`/usr/bin/env git rev-parse --short HEAD`
defaults write "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH" CFBundleShortVersionString "$HEAD"

Modern iOS

iOS 6+

diff iOS6 iOS7

Modern Objective-C

$(document).on('click', 'li', function() { })

over

$('li').click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment