Skip to content

Instantly share code, notes, and snippets.

@xperienced
xperienced / update
Created January 10, 2016 19:12
GIT update hook for git push to deploy
#!/usr/bin/env bash
readonly APP_NAME=test_app
readonly GIT_WORK_TREE=~/apps/$APP_NAME
declare REF_NAME=$1 COMMIT_HASH=$3
if [[ "$REF_NAME" == "refs/heads/master" ]]; then
echo "Master branch updated. Deploying to production."
mkdir -p $GIT_WORK_TREE
@xperienced
xperienced / git use https
Created March 17, 2015 08:36
GIT - use https instead of git
git config --global url."https://".insteadOf git://
@xperienced
xperienced / sc2cc.sh
Last active August 29, 2015 14:16
SED script to convert between snake_case and camelCase
#!/bin/bash
sed -e 's/_\([a-z]\)/\U\1/g'
@xperienced
xperienced / .gitconfig
Last active June 6, 2016 10:01
Git aliases
[alias]
cp = cherry-pick
st = status
ci = commit
br = branch
co = checkout
cob = checkout -b
df = diff
lg = log --graph --oneline --all --decorate
cm = !git add -A && git commit -m
@xperienced
xperienced / symbolicate_crash.sh
Created August 22, 2012 18:57
Symbolicate iOS crash report
#!/bin/sh
export DEVELOPER_DIR="/Applications/XCode.app/Contents/Developer"
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKit.framework/Versions/A/Resources/symbolicatecrash -A -v "$1"