This file contains hidden or 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
| eval "$(rbenv init - zsh)" | |
| function parse_git_branch() { | |
| git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p' | |
| } | |
| COLOR_DEF=$'%f' | |
| COLOR_USR=$'%F{243}' | |
| COLOR_DIR=$'%F{197}' | |
| COLOR_GIT=$'%F{39}' |
This file contains hidden or 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
| alias deeplink="xcrun simctl openurl booted" | |
| alias ssh-keychain="ssh-add --apple-use-keychain ~/.ssh/id_rsa" | |
| adb-killall () { | |
| adb devices | grep emulator | while read line; do adb -s $line emu kill; done | |
| } |
This file contains hidden or 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
| git update-index --assume-unchanged FILENAME | |
| git update-index --no-assume-unchanged FILENAME |
This file contains hidden or 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
| rename 's/13-3-0/13-5-0/' */* |
This file contains hidden or 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 . -type f -name '*.txt' -exec sed -i '' s/drutex/[email protected]/ {} + |
This file contains hidden or 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
| ps aux | grep _sim | grep -v grep | awk '{print $2}' | xargs kill -9 2>/dev/null |
This file contains hidden or 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
| *~ | |
| FailedSnapshots | |
| #*# | |
| *orig | |
| *_BACKUP_* | |
| *_BASE_* | |
| *_LOCAL*_ | |
| *_REMOTE*_ |
This file contains hidden or 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/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 |
This file contains hidden or 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
| 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; | |
| } |
This file contains hidden or 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
| 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) | |
| } |
NewerOlder