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
// 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 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
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 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
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 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
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 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
# This should be run on a new Linode Ubuntu 32-bit image to prepare it for hosting GTG | |
# To start, something like this works: | |
# scp prepare_server.sh [email protected]:/root | |
# First, install basic linux utilities (compilers, git, libssl) | |
cd /root | |
apt-get 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
server.configure(function() { | |
// Settings | |
server.set('app root', root + '/app'); | |
server.set('view engine', options.view_engine || 'jade'); | |
server.set('views', server.set('app root') + '/views'); | |
server.set('public', server.set('app root') + '/public'); | |
server.set('port', options.port); | |
server.set('host', options.host); |
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
server.use(stylus.middleware({ | |
src: server.set('views') + '/stylus', | |
dest: server.set('public') + '/styles' | |
})); |
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
ko.mustacheTemplateEngine = function () { | |
this['getTemplateNode'] = function (template) { | |
var templateNode = document.getElementById(template); | |
if (templateNode == null) | |
throw new Error("Cannot find template with ID=" + template); | |
return templateNode; | |
} | |
this['renderTemplate'] = function (templateId, data, options) { |
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
# serve static files | |
location /images { | |
root /var/rapp/labs/app/public/; | |
expires 30d; | |
} | |
# pass dynamic content to node | |
location / { | |
proxy_pass http://127.0.0.1:90/; | |
} |
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
#title | |
h1 | |
span.lead our incredible | |
strong capabilities | |
span.tail make us both look good. | |
#demos | |
- for(var i = 0; i < 5; i++) | |
.demo | |
a(href='/max') |