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
| #!/bin/bash | |
| # A simple script to backup an organization's GitHub repositories. | |
| #------------------------------------------------------------------------------- | |
| # NOTES: | |
| #------------------------------------------------------------------------------- | |
| # * User @jimklimov (and probably some others called out in the long comment | |
| # thread below) have modified this script to make it more robust and keep | |
| # up with various changes in the GitHub API and response format at: | |
| # https://github.com/jimklimov/github-scripts |
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
| var mongoose = require('./../mongoose'); | |
| var Schema = mongoose.Schema; | |
| var sleep = 1000; | |
| var timer; | |
| var db = mongoose.createConnection(); | |
| db.on('error', function () { | |
| // error on startup | |
| console.error('conn error', arguments); |
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
| // JSON is dangerous, take one of these! | |
| + (id)nullGuardedDict:(NSDictionary *)dict valueForKey:(NSString *)key; | |
| { | |
| id obj = nil; | |
| obj = [dict valueForKey:key]; | |
| if (obj == [NSNull null]) { | |
| obj = nil; | |
| } | |
| return obj; |
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/zsh | |
| # Compatible with bash, just change "zsh" to "bash" | |
| # First param: The folder that the original file is stored in | |
| # Second param: The original image name | |
| sips --resampleWidth 512 "${1}/${2}" --out "${1}/iTunesArtwork" | |
| sips --resampleWidth 57 "${1}/${2}" --out "${1}/Icon.png" | |
| sips --resampleWidth 114 "${1}/${2}" --out "${1}/Icon@2x.png" | |
| sips --resampleWidth 29 "${1}/${2}" --out "${1}/Icon-Small.png" | |
| sips --resampleWidth 58 "${1}/${2}" --out "${1}/Icon-Small@2x.png" |
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 <Foundation/Foundation.h> | |
| @interface NSURL (Pieces) | |
| -(NSDictionary *)piecesDictionary; | |
| @end |
NewerOlder