This file contains 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 glt="git describe --tags | sed -n 's/^v\([0-9]*.[0-9]*.[0-9]*\)/\1/p'" |
This file contains 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
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${PROJECT_DIR}/${INFOPLIST_FILE}") | |
appVersion=$(cd $PROJECT_DIR && git describe --tags | sed -n 's/^v\([0-9]*.[0-9]*.[0-9]*\)/\1/p') | |
buildNumber=$appVersion | |
echo $buildNumber | |
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" |
This file contains 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
describe(@"appVersion", ^{ | |
beforeAll(^{ | |
NSMutableDictionary *testDefaults = @{}.mutableCopy; | |
[NSUserDefaults stub:@selector(standardUserDefaults) andReturn:testDefaults]; | |
}); | |
it(@"should return what ABApplicationVersionKey is set to", ^{ | |
[NSUserDefaults.standardUserDefaults setObject:FOO forKey:ABApplicationVersionKey]; | |
[[ABConfiguration.appVersion should] equal:FOO]; | |
}); |
This file contains 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
NSString *ABTypeCodeToString(UInt32 typeCode) | |
{ | |
char string[5] = {*(((char*)&typeCode)+3), *(((char*)&typeCode)+2), *(((char*)&typeCode)+1), *(((char*)&typeCode)+0),0}; | |
NSString *codeWithDot = @(string); | |
return [codeWithDot stringByTrimmingCharactersInSet:NSCharacterSet.punctuationCharacterSet]; | |
} | |
UInt32 ABStringToTypeCode(NSString *typeString) | |
{ |
This file contains 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
function Image(width, height) { | |
this.width = width; | |
this.height = height; | |
} | |
function createImageTriplet() { | |
var imageTriplet = []; | |
imageTriplet.push(new Image(1000, 500)); | |
imageTriplet.push(new Image(600, 800)); |
This file contains 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
package controllers; | |
import play.mvc.Result; | |
import play.libs.F.Function; | |
import play.libs.WS; | |
import play.mvc.*; | |
public class Application extends Controller { | |
public static Result index() { |
This file contains 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
global.Frei = {} if typeof global.Frei is 'undefined' | |
Frei = global.Frei | |
path = require 'path' | |
express = require 'express' | |
assets = require 'connect-assets' | |
sugar = require 'sugar' | |
request = require 'request' | |
fs = require 'fs' | |
passport = require('passport') |
This file contains 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 CookieJar, Frei, LocalStrategy, Mack, RedisStore, Routes, UserController, app, asset_helper, assets, ensureAuthenticated, express, expressUglify, fs, mack, passport, path, request, sugar, __assets, __lib, __public, __uploads, | |
_this = this; | |
if (typeof global.Frei === 'undefined') { | |
global.Frei = {}; | |
} | |
Frei = global.Frei; | |
path = require('path'); |
This file contains 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
rm ~/.npmrc | |
npm adduser | |
# follow prompts... | |
npm publish --verbose |
This file contains 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 airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport" | |
CURRENT_WIFI_SSID=$(eval airport -I | grep '^[[:space:]]*SSID' | sed -e 's/^.*SSID: //g') | |
proxy() { | |
export addy='http://www-west.sony.com:80' | |
git config --global http.proxy $addy | |
git config --global https.proxy $addy | |
npm config set http-proxy $addy | |
npm config set https-proxy $addy |