1
https://gist.github.com/3144842
2
https://gist.github.com/3144998
3
https://gist.github.com/3145089
4
https://gist.github.com/3145226
5
https://gist.github.com/3145525
6
https://gist.github.com/3145551
7
https://gist.github.com/3145587
8
https://gist.github.com/3145608
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
/* | |
I have an existing node.js API server that runs on top of restify. I wanted to add http-proxy to forward | |
some calls to another API server. From the http-proxy examples out there, it seemed simply enough: | |
*/ | |
var httpProxy = require('http-proxy'); | |
var proxy = new httpProxy.RoutingProxy(); | |
var restify = require('restify'); | |
var server = restify.createServer(); |
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
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
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 request = require('request') | |
request.get('http://api.twitter.com/1/users/show.json?screen_name=mikeal', {json:true}, function (e, r, doc) { | |
console.log(doc) | |
}) | |
request.get('https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=mikeal', {json:true}, function (e, r, doc) { | |
console.log(doc) | |
}) |
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
######## WATCHER SCRIPT. Runs very .5 seconds, checks for changes in the source 'html5' dir. | |
#!/bin/sh | |
MD5=`cat /tmp/watcher.md5 | awk '{print $4}'`; | |
X=0; | |
while [ $X -eq 0 ]; do | |
newMD5=`ls -altR html5/ | grep -v app.json > /tmp/watcher.md5 && md5 /tmp/watcher.md5 | awk '{print $4}'`; | |
if [[ "$MD5" != "$newMD5" ]]; then |