This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target :'MyApplicationTestsHost', :exclusive => true do | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find $DIR -type f \( -name '*.h' -o -name '*.mm' \) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example: renaming files named {0, 0, 0, 0} to 0-0-0-0 | |
find $DIR -type f | while read f | |
do | |
NEW=`echo $f | sed 's/[{}]*//g' | sed 's/, /-/g'` | |
git mv "$f" $NEW | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT = Artsy | |
BUNDLE_ID = net.artsy.artsy.beta | |
CONFIGURATION = Beta | |
WORKSPACE = $(PROJECT).xcworkspace | |
SCHEME = $(PROJECT) | |
APP_PLIST = $(PROJECT)/App/$(PROJECT)-Info.plist | |
IPA = $(PROJECT).ipa | |
DSYM = $(PROJECT).app.dSYM.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the query: | |
// foo amount:15 | |
// first becomes an array of predicate templates | |
[ "${column} like '%foo%'", "${column} >= 14 and ${column} <= 16" ] | |
// next, we inspect the model to find which columns to search on | |
// and repeat each query for each property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Combines two versions of a file by removing all conflict markers | |
# Usage: git-merge-combine MyProject.xcodeproj/project.pbxproj | |
FILE=$1 | |
TMPFILE=$1.tmp | |
sed -e 's/<<<<<<< HEAD//; s/=======//g; s/>>>>>>> .*$//' $FILE > $TMPFILE | |
if [ $? -ne 0 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -Rl "$1" * | grep -v build | grep -v BankSimple.xcodeproj | grep -v Icon*.png | grep -v Assets | |
filename=$1 | |
extension=${filename##*.} | |
filename=${filename%.*} | |
grep -Rl $filename * | grep -v build | grep -v BankSimple.xcodeproj | grep -v Icon*.png | grep -v Assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for f in `find Resources/Images -type f ! -name '*@2x.png' ! -name 'Default*.png'`; do | |
FILENAME=`basename $f`; | |
NUSAGES=`usages $FILENAME | wc -l | awk '{print $1}'`; | |
if [ $NUSAGES = 0 ]; then | |
echo $f; | |
fi; | |
done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIColor* UIColorFromRGB(NSInteger rgb) { | |
return [UIColor colorWithRed:((float) ((rgb & 0xFF0000) >> 16)) / 0xFF | |
green:((float) ((rgb & 0xFF00) >> 8)) / 0xFF | |
blue:((float) (rgb & 0xFF)) / 0xFF | |
alpha:1.0]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (is-fermat-prime? n iterations) | |
(or (<= iterations 0) | |
(if (= (modulo (expt (+ (random (- n 1)) 1) (- n 1)) n) 1) | |
(is-fermat-prime? n (- iterations 1)) | |
#f))) |
NewerOlder