Skip to content

Instantly share code, notes, and snippets.

View tupakapoor's full-sized avatar

Ameesh Kapoor tupakapoor

  • 412 Food Rescue
  • PGH
View GitHub Profile
@tupakapoor
tupakapoor / gist:831a886afa423a73b6da
Created August 14, 2015 20:46
Async then Sync macro
#define dispatchAsyncThenSync(asyncBlock, syncBlock) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ \
asyncBlock(); \
dispatch_async(dispatch_get_main_queue(), ^{ syncBlock(); }); \
});
@tupakapoor
tupakapoor / newbranch.sh
Last active December 22, 2015 11:38
A script to make creating a new branch from the most up to date version of upstream/master easier
#!/bin/bash
if [ -z "$1" ]; then
echo usage: newbranch newbranchname oldbranchtoclonefrom
exit
fi
git remote -v | grep upstream > /dev/null
if [ $? -ne 0 ]; then
echo You must have a remote named upstream