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
HaB™ |
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
1 import urllib2 | |
2 import json | |
221 def basic_authorization(user, password): | |
222 s = user + ":" + password | |
223 return "Basic " + s.encode("base64").rstrip() | |
224 | |
225 def submit_pull_request(user, repo): | |
226 auth = (settings.username, settings.password) | |
227 url = 'https://api.github.com/repos/' + user + '/' + repo + '/pulls' |
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
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); | |
_gaq.push(['_setDomainName', 'none']); | |
_gaq.push(['_setAllowLinker', true]); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
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
#!/bin/bash | |
DIR=/var/www/YOUR_APP_NAME | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
NODE_PATH=/usr/local/lib/node_modules | |
case $1 in | |
start) | |
nohup "node" "$DIR/proxy.js" 1>>"$DIR/logs/proxy.log" 2>&1 & | |
echo $! > "$DIR/pids/proxy.pid"; | |
;; |
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
/* | |
node-http-proxy | |
with websockets from socketio | |
*/ | |
var util = require('util'), | |
colors = require('colors'), | |
websocket = require('../../vendor/websocket'), | |
httpProxy = require('../../lib/node-http-proxy'); |
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
#!/bin/bash | |
DIR=/var/www/YOUR_NODE_APP_GOES_HERE | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
NODE_PATH=/usr/local/lib/node_modules | |
NODE=/usr/local/bin/node | |
test -x $NODE || exit 0 | |
function start_app { | |
NODE_ENV=production nohup "$NODE" "$DIR/YOUR_APP_SERVER_FILE.js" 1>>"$DIR/logs/YOUR_APP_NAME.log" 2>&1 & |
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
#!monit | |
set logfile /var/log/monit.log | |
check process nodejs with pidfile "/var/www/NODEAPP/YOUR_APP.pid" | |
start program = "/etc/init.d/node_app start" | |
stop program = "/etc/init.d/node_app stop" | |
if failed port 8080 protocol HTTP | |
request / | |
with timeout 10 seconds | |
then restart |
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
<script type="text/javascript" src="https://github.com/Miserlou/Blaccupy/raw/master/blaccupy.js"></script> |
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
<script type="text/javascript" src="https://github.com/Miserlou/Blaccupy/raw/master/blaccupy.js"></script> |
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
"iPhone developer needed for amazing new application. Send me your resume." |
OlderNewer