Skip to content

Instantly share code, notes, and snippets.

@airdrummingfool
airdrummingfool / nth-commit.sh
Last active December 7, 2018 15:31 — forked from joeyates/nth-commit
Checkout the nth commit on a specified branch.
#!/bin/bash
# nth-commit.sh
# Usage: `nth-commit.sh n [branch]`
branch=${2:-'master'}
SHA1=$(git rev-list $branch | tail -n $1 | head -n 1)
git checkout $SHA1
#!/bin/bash
# copy_reveal.sh
# Ref: https://gist.github.com/airdrummingfool/9557257
APPBUNDLEPATH="${TARGET_BUILD_DIR}/${EXECUTABLE_NAME}.app/"
REVEALFRAMEWORKPATH="/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib"
if [ -f "${REVEALFRAMEWORKPATH}" ] && [ "${CONFIGURATION}" == "Debug" ]; then
""" File: reveal.py
1. Add to ~/.lldbinit:
command script import ~/.lldb-scripts/reveal.py
2. Add Run Script Build Phase to copy libReveal.dylib into the bundle
(see https://gist.github.com/airdrummingfool/9557257)
Q: Want to automatically load the Reveal lib on launch while debugging from Xcode?
A: In Xcode:
Add a Symbolic Breakpoint