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
| export ZSH=/Users/jlesouef/.oh-my-zsh | |
| ZSH_THEME="robbyrussell" | |
| plugins=(git) | |
| source $ZSH/oh-my-zsh.sh | |
| source ~/Developer/zsh-git-prompt/zshrc.sh | |
| # an example prompt |
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
| # xcode-build-bump.sh | |
| # @desc Auto-increment the build number every time the project is run. | |
| # @usage | |
| # 1. Select: your Target in Xcode | |
| # 2. Select: Build Phases Tab | |
| # 3. Select: Add Build Phase -> Add Run Script | |
| # 4. Paste code below in to new "Run Script" section | |
| # 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
| # 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.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
| // UIColor(hex: 0xFF0000) | |
| extension UIColor { | |
| convenience init(hex: Int) { | |
| let components = ( | |
| R: CGFloat((hex >> 16) & 0xff) / 255, | |
| G: CGFloat((hex >> 08) & 0xff) / 255, | |
| B: CGFloat((hex >> 00) & 0xff) / 255 | |
| ) |
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
| extension UIColor { | |
| static func Random() -> UIColor { | |
| let r:CGFloat = CGFloat(drand48()) | |
| let g:CGFloat = CGFloat(drand48()) | |
| let b:CGFloat = CGFloat(drand48()) | |
| return UIColor(red: r, green: g, blue: b, alpha: 1.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
| import UIKit | |
| import XCPlayground | |
| let buttonSize:CGFloat = 30 | |
| let viewHeight:CGFloat = 90 | |
| let viewWidth:CGFloat = 300 | |
| var view = UIView() | |
| view.frame = CGRect(x: 0, y: 0, width: viewWidth, height: viewHeight) | |
| view.backgroundColor = UIColor.grayColor() |
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
| FOR ACTION SEND | |
| ⌘← "HEX CODE" 0x01 | |
| ⌘→ "HEX CODE" 0x05 | |
| ⌥← "SEND ESC SEQ" b | |
| ⌥→ "SEND ESC SEQ" f |
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
| // put this in your "from" view controller" | |
| override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { | |
| if segue.identifier == "toHomeView" { | |
| let destinationViewController = segue.destinationViewController as! HomeViewController; | |
| // setup the destination controller | |
| } | |
| } |
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
| // put this in your 'to' view controller | |
| @IBAction func unwindSegue(segue: UIStoryboardSegue) { | |
| // do stuff | |
| } |
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
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| #brew install bash-git-prompt | |
| if [ -f "$(brew --prefix bash-git-prompt)/share/gitprompt.sh" ]; then | |
| GIT_PROMPT_THEME=Default | |
| source "$(brew --prefix bash-git-prompt)/share/gitprompt.sh" | |
| 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
| [core] | |
| editor = code --wait | |
| excludesfile = ~/.gitignore_global | |
| [fetch] | |
| prune = true | |
| [alias] | |
| co = checkout | |
| ec = config --global -e | |
| up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
| cob = checkout -b |
NewerOlder