- サーバサイドはとにかくAPIに徹する感じ
- レンダリングはクライアントで
- Nginx
- 静的ファイルの配信
- リバースプロキシ
- Socket.IOのリバプロ設定
var spawn = require('child_process').spawn; | |
var ls = spawn('bash',['-c','ls','/*']); | |
ls.stdout.on('data', function(data){ | |
console.log(data.toString()); | |
}); |
let ff_table = {'dos' : 'CR+LF', 'unix' : 'LF', 'mac' : 'CR' } | |
set statusline=%F%m%r%h%w\ [%Y][%{ff_table[&ff]}][%{&fileencoding}] | |
" %{ff_table[&ff]} で改行コード表示 | |
" %{&fileencoding} で文字エンコーディング表示 |
a = Hash[ *(<<EOS.split("\n").map {|e| [e,true]}.flatten()) ] | |
foo | |
bar | |
baz | |
EOS | |
p a # => {"foo"=>true, "bar"=>true, "baz"=>true} |
h = { | |
hoge: <<EOS, | |
Hey! | |
EOS | |
fuga: <<EOS | |
Yo! | |
EOS | |
} | |
p h |
var assert = function(expr, msg){ | |
var message = 'Assertion failed'; | |
if(msg) message += ': ' + msg; | |
if(!expr) throw new Error(message); | |
}; | |
var matchResultA; | |
(function(){ | |
var A = RegExp('.'); |
#include <map> | |
#include <string> | |
#include <cstdlib> | |
#include <iostream> | |
#include <fstream> | |
#include <ux/ux.hpp> | |
using namespace std; | |
int main(int argc, char** argv){ |
#!/bin/sh | |
NODE_VERSIONS=("v0.4.12" "v0.6.5") | |
VERSION_MANAGER="/usr/local/bin/nodebrew use" | |
for val in ${NODE_VERSIONS[@]} | |
do | |
$VERSION_MANAGER $val | |
npm run-script install | |
npm run-script test |
#!/usr/bin/env node | |
(function() { | |
var verbose = false; | |
var args = process.argv; | |
var fs = require("fs"); | |
var jsmeter = require("jsmeter").jsmeter; | |
for(var a = 2; a < args.length; a++) { | |
if(args[a] === "--verbose") { | |
verbose = true; |
#logo-container, #search-submit, /*#chrome-lhn-menu,*/ #viewer-footer, #mark-#viewer-refresh, #item-up-down-buttons, #search div[class="goog-inline-block jfk-button jfk-button-action"] { | |
display: none !important; | |
} | |
#gb, #top-bar { | |
visibility: collapse !important; | |
height: 0px !important; | |
border: none !important; | |
} | |
#gbg { | |
z-index: 20010 !important; |