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
HEADERS: | |
{ host: '192.168.2.4', | |
'x-requested-with': 'XMLHttpRequest', | |
'user-agent': 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_8 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8E401 Safari/6533.18.5', | |
'content-type': 'application/x-www-form-urlencoded', | |
accept: 'application/json', | |
referer: 'http://192.168.2.4/mobile/index.html', | |
'accept-language': 'en-us', | |
'accept-encoding': 'gzip, deflate', | |
cookie: 'session=cV9CXtS4w5jOKX0Frx3XOeRV.MPq6pHXem1kslr3w%2FeJdtBgCAX0jGy8P3CI5upNFV%2BI', |
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
server.use(stylus.middleware({ | |
src: server.set('views'), | |
dest: server.set('public'), | |
debug: false, | |
compileMethod: function(str) { | |
return stylus(str) | |
.set('compress', options.compressCss); | |
}, | |
force: 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
hunter@ws1:/var/node/gtg$ echo $NODE_ENV | |
production | |
hunter@ws1:/var/node/gtg$ sudo echo $NODE_ENV | |
production | |
hunter@ws1:/var/node/gtg$ node server.js single | |
Starting in environment: production | |
Opening server on port 443... | |
Error in unix_dgram bind of /var/node/gtg/cluster.21657.server.sock | |
Error: EACCES, Permission denied | |
at dgram.js:125:19 |
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
// Activate WM+ | |
Serial.println("Intitializing MP"); | |
Wire.beginTransmission(0x52); | |
Serial.println("1"); | |
Wire.send(0xf0); | |
Serial.println("2"); | |
Wire.send(0x55); | |
Serial.println("3"); | |
Wire.endTransmission(); | |
Serial.println("4"); |
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
# --- setup.sh: | |
... | |
deployer=`config_get user` | |
{ echo "cat <<EOFNOREALLY" | |
cat "$SCRIPTS/template.sh" | |
echo "EOFNOREALLY" | |
} | sh > "/tmp/templated.sh" | |
cat /tmp/templated.sh | |
... |
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(exports, $, otherLibrariesYouNeed) { | |
var localVariable = 'This is bound in the closure, so I will not create accidental globals.'; | |
function PrivateFunction() { | |
} | |
function MyConstructor() { | |
this.property = 'something'; |
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 express = require('express'); | |
var app = express.createServer(); | |
app.use(express.bodyParser()); | |
app.use(app.router); | |
app.get('/', function(req, res) { | |
req.send('hello, world'); | |
}); |
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
hunter:~/work/base12$ scripts/provision/provision -si 165.225.129.25 config/web.server.json | |
Provisioning 165.225.129.25 | |
Using /Users/hunter/work/base12/config/web.server.json | |
=== Setup === | |
Setting up for Joyent | |
Config is: { type: 'joyent', install: [ 'redis', 'mongodb', 'node' ] } | |
EXECUTING: ssh [email protected] 'bash -s' < /Users/hunter/work/base12/scripts/provision/joyent/setup.sh | |
CODE: null |
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
npm http GET https://registry.npmjs.org/express-resource/0.2.4 | |
npm http 304 https://registry.npmjs.org/base12/0.2.9 | |
npm http 304 https://registry.npmjs.org/handlebars/1.0.5beta | |
npm http 404 https://registry.npmjs.org/express/3.0.0alpha1-pre | |
npm ERR! Error: version not found: 3.0.0alpha1-pre : express/3.0.0alpha1-pre | |
npm ERR! at Request._callback (/opt/nodejs/v0.6.8/lib/node_modules/npm/lib/utils/npm-registry-client/request.js:181:12) | |
npm ERR! at Request.callback (/opt/nodejs/v0.6.8/lib/node_modules/npm/node_modules/request/main.js:119:22) | |
npm ERR! at Request.<anonymous> (/opt/nodejs/v0.6.8/lib/node_modules/npm/node_modules/request/main.js:605:16) | |
npm ERR! at Request.emit (events.js:67:17) |
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 -rf /usr/local/{lib/node_modules,share/man/*,bin,etc}/npm* ~/.npm ~/.npmrc |