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-select --install |
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
$ brew update |
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
# Tracking a remote branch | |
git checkout -t origin/branchname | |
git checkout --track -b star origin/star | |
# Ignore changes to tracked files (.gitignore for untracked files) | |
git update-index --assume-unchanged <filenames> # begin ignoring changes to <filenames> | |
git update-index --no-assume-unchanged <filenames> # start tracking changes again to <filenames> |
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
// taken from http://iphoneincubator.com/blog/tag/nslog | |
#ifdef DEBUG | |
# define DLOG(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
#else | |
# define DLOG(...) | |
#endif | |
// ALog always displays output regardless of the DEBUG setting | |
#define ALOG(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); |
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 fs = require('fs') | |
var thirtySecondsInMillis = 30*1000; | |
function postAuthenticate(request, response, postData) { | |
var postDataDict = JSON.parse(postData); | |
console.log("* postAuthenticate: " + postData); | |
// console.log("* [RECVD KEY/VALUE] " + querystring.parse(postData).text); | |
console.log("* [RECVD JSON] " + postDataDict['username'] + " " + postDataDict['password']); | |
if (postDataDict['username'] == 'luther' && postDataDict['password'] == 'baker') { |
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
require 'sinatra' | |
require 'json' | |
require "sinatra/cookies" | |
session_timeout_seconds = 30 | |
before do | |
content_type 'application/json' | |
end |
NewerOlder