sudo /etc/init.d/iptables stop
sudo yum groupinstall "Development Tools"
sudo yum install pcre-devel
module.exports = { | |
/** | |
* | |
* Using raw socket.io functionality from a Sails.js controller | |
* | |
*/ | |
index: function (req,res) { |
/* | |
* Accept control commands via USB. | |
* | |
* Commands start with '!' and end with '.' | |
* Commands have three parts: action, pin, value: !AAPPVV. | |
* | |
* E.g. '!01p101.' is DigitalWrite, Pin1, value = 1 | |
* | |
* Note: This is currently *very* crude. Much improvement could be made. | |
* I think the use of strncpy is eating a lot of memory. Refactor? |
// api/controllers/AuthController.js | |
var passport = require('passport'); | |
var AuthController = { | |
login: function (req,res) | |
{ | |
res.view(); | |
}, |
[email protected]系でStylusのコンパイル、Styledoccoの生成、CSSファイルの結合・minifyを自動化するためのメモ。
環境の構築はpackage.json
で行う。
gruntに関連したpackage.json
周りはこのページが詳しい。
Gruntによる継続的なビルド環境を求めて 〜 package.jsonと0.4.0のこと ::ハブろぐ
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |