An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
if [ $CONFIGURATION == Release ]; then | |
echo "Bumping build number..." | |
plist=${PROJECT_DIR}/${INFOPLIST_FILE} | |
#increment the build number (ie 115 to 116) | |
buildnum=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${plist}") | |
if [[ "${buildnum}" == "" ]]; then | |
echo "No build number in $plist" | |
exit 2 | |
fi |
#import "NSObject+Reflection.h" | |
#import <objc/runtime.h> | |
@implementation NSObject (Reflection) | |
- (NSArray *)propertyKeys | |
{ | |
unsigned int outCount, i; | |
objc_property_t *properties = class_copyPropertyList([self class], &outCount); | |
NSMutableArray *keys = [[NSMutableArray alloc] initWithCapacity:outCount]; |
#/bin/sh | |
export PATH=/opt/local/bin/:/opt/local/sbin:$PATH:/usr/local/bin: | |
DATE=$( /bin/date +"%Y-%m-%d" ) | |
ARCHIVE=$( /bin/ls -t "${HOME}/Library/Developer/Xcode/Archives/${DATE}" | /usr/bin/grep xcarchive | /usr/bin/sed -n 1p ) | |
APP="${HOME}/Library/Developer/Xcode/Archives/${DATE}/${ARCHIVE}/Products/Applications/${PRODUCT_NAME}.app" | |
APPID=$(/usr/libexec/PlistBuddy -c "Print CFBundleIdentifier" "${APP}/Info.plist") | |
LOG="/tmp/iconVersioning.log" | |
/bin/rm "/tmp/iconVersioning.log" |
export PATH=/opt/local/bin/:/opt/local/sbin:$PATH:/usr/local/bin: | |
convertPath=`which convert` | |
echo ${convertPath} | |
if [[ ! -f ${convertPath} || -z ${convertPath} ]]; then | |
echo "WARNING: Skipping Icon versioning, you need to install ImageMagick and ghostscript (fonts) first, you can use brew to simplify process: | |
brew install imagemagick | |
brew install ghostscript" | |
exit 0; | |
fi |
#!/bin/sh | |
#! via https://www.digitalocean.com/community/tutorials/how-to-setup-your-own-vpn-with-pptp | |
if [ `id -u` -ne 0 ] | |
then | |
echo "please run it by root" | |
exit 0 | |
fi | |
apt-get -y update |
find "${SRCROOT}" \( -name "*.m" \) -and \( -path "${SRCROOT}/Pods/*" -prune -o - | |
print0 \) | xargs -0 wc -l | awk '$1 > 400 && $2 != "total" {for(i=2;i<NF;i++){printf "%s%s", $i, " "} print $NF ":1: warning: File more than 400 lines (" $1 "), consider refactoring." }' |
KEYWORDS="TODO|FIXME|\?\?\?:|\!\!\!:" | |
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -and \( -path "${SRCROOT}/Pods/*" -prune -o -print0 \) | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/" |
(a gist based on the old toolmantim article on setting up remote repos)
To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.
This is somewhat of a follow-up to the previous article setting up a new rails app with git.
Set up the new bare repo on the server: