In this assignment you should design and implement a minimal object-based programming language with delegation. It must be complete enough to
- read instructions of arbitrary form (any human-readable format)
(global-hl-line-mode 1) | |
(set-face-background 'hl-line "#3e4446") | |
(set-face-foreground 'highlight nil) | |
(transient-mark-mode 1) | |
(set-face-background 'region "white") | |
(set-face-foreground 'region "blue") | |
(set-face-background 'highlight "white") | |
(set-face-foreground 'highlight "blue") | |
(setq make-backup-files nil) |
build_number=`date +%d.%m.%Y` | |
for x in `find ${SRCROOT}/Resources/Applications -name "Info.plist" -print`; do | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${build_number}" "$x" | |
done |
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.h" -or -name "*.cpp" ")" -print0 | xargs -0 wc -l |
#!/bin/bash | |
IFS=$'\n' | |
git log --format='%aN' | sort -u | while read -r user ; do | |
echo $user | |
git log --author=$user --pretty=tformat: --numstat -- . ":(exclude)*.pbxproj" ":(exclude)*.xcworkspace" ":(exclude)*.storyboard" ":(exclude)*.xib" ":(exclude)*Pods" ":(exclude)*Podfile.lock"| awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' | |
done |
#!/bin/bash | |
version=`grep -E "\.version\s*=\s*[\"']*[\"']" Registration.podspec | awk -v FS="('|')" '{print $2}'` | |
version=`echo $version | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}'` | |
echo $version |
func generateRandomColor() -> UIColor { | |
let hue : CGFloat = CGFloat(arc4random() % 256) / 256 // use 256 to get full range from 0.0 to 1.0 | |
let saturation : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from white | |
let brightness : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from black | |
return UIColor(hue: hue, saturation: saturation, brightness: brightness, alpha: 1) | |
} |
func imageFromColor(color: UIColor) -> UIImage { | |
let rect = CGRectMake(0, 0, 10, 10) | |
UIGraphicsBeginImageContext(rect.size) | |
let context = UIGraphicsGetCurrentContext(); | |
CGContextSetFillColorWithColor(context, color.CGColor); | |
CGContextFillRect(context, rect); | |
let image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
return image; | |
} |
#!/bin/bash | |
echo Deleting merged branches... | |
#git pull | |
for b in $(git branch -a --merged develop); | |
do | |
branch=${b#"remotes/origin/"} | |
if [[ "$branch" == "develop" ]]; then | |
continue | |
fi |
*~ | |
FailedSnapshots | |
#*# | |
*orig | |
*_BACKUP_* | |
*_BASE_* | |
*_LOCAL*_ | |
*_REMOTE*_ |