Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| #!/usr/bin/env bash | |
| # Create a page in the current dir | |
| echo "My Test Page" > test.html | |
| # Start server | |
| python -m SimpleHTTPServer 8000 &> /dev/null & | |
| pid=$! | |
| # Give server time to start up |
| # | |
| # Set the build number to the current git commit count. | |
| # If we're using the Dev scheme, then we'll suffix the build | |
| # number with the current branch name, to make collisions | |
| # far less likely across feature branches. | |
| # Based on: http://w3facility.info/question/how-do-i-force-xcode-to-rebuild-the-info-plist-file-in-my-project-every-time-i-build-the-project/ | |
| # | |
| # Updated with dSYM handling from http://yellowfeather.co.uk/blog/auto-incrementing-build-number-in-xcode-revisited/ | |
| # |
| # Test Build (armv7 only) | |
| # | |
| ionic platform remove ios | |
| gulp useref | |
| ionic platform add ios | |
| cp assets/build/ios/build.xcconfig platforms/ios/cordova/build.xcconfig | |
| ionic build ios --device | |
| xcrun -sdk iphoneos PackageApplication -v platforms/ios/build/device/appname.app -o deployments/appname-test.ipa | |
| /usr/bin/codesign --display platforms/ios/build/device/appname.app | |
| /usr/bin/codesign --verify platforms/ios/build/device/appname.app |
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| // Modified version of an Apple Docs example that accomodates for the extra milliseconds used in NodeJS/JS dates | |
| // https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/TP40002369-SW1 | |
| - (NSDate *)dateForRFC3339DateTimeString:(NSString *)rfc3339DateTimeString { | |
| NSDateFormatter *rfc3339DateFormatter = [[NSDateFormatter alloc] init]; | |
| [rfc3339DateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'"]; | |
| [rfc3339DateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]]; | |
| // Convert the RFC 3339 date time string to an NSDate. |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| /* Set up Git Configuration */ | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "Your Name" | |
| git config --global core.editor "vi" | |
| git config --global color.ui true |
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| josh@onix:/tmp/http-repl$ curl -sSNT. localhost:8000 | |
| Actual repl over http. NOW WITH A LIMITED CONTEXT!! | |
| >> help | |
| 'Exits are North, South and Dennis.' | |
| >> .exit | |
| Terminal exiting. | |
| You'll want to mash ctrl-c. | |
| ^C | |
| josh@onix:/tmp/http-repl$ |