Skip to content

Instantly share code, notes, and snippets.

View nulltask's full-sized avatar

Seiya KONNO nulltask

View GitHub Profile
@nulltask
nulltask / .gitignore
Created April 17, 2012 09:03
face-osc-server
.DS_Store
node_modules
@nulltask
nulltask / app.js
Created March 17, 2012 08:46
Output CSV in Express
/**
* Module dependencies.
*/
var express = require('express')
, app = module.exports = express.createServer();
// Configuration
app.use(app.router);
@nulltask
nulltask / fonts.xml
Last active September 28, 2021 11:25
<font weight="100" style="normal">.SST-UltraLight.ttf</font>
<font weight="100" style="italic">.SST-UltraLightItalic.ttf</font>
<font weight="300" style="normal">.SST-Light.ttf</font>
<font weight="300" style="italic">.SST-LightItalic.ttf</font>
<font weight="400" style="normal">.SSTVietnamese-Roman.ttf</font>
<font weight="700" style="normal">.SSTVietnamese-Bold.ttf</font>
<font weight="500" style="normal">.SST-Medium.ttf</font>
<font weight="500" style="italic">.SST-MediumItalic.ttf</font>
<font weight="900" style="normal">.SST-Heavy.ttf</font>
<font weight="900" style="italic">.SST-HeavyItalic.ttf</font>
@nulltask
nulltask / app.js
Created February 21, 2012 16:36
Node.js cluster module with Socket.IO
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, socket = require('socket.io')
, RedisStore = socket.RedisStore
, cluster = require('cluster');
@nulltask
nulltask / 20140826.md
Last active September 13, 2020 09:08
Express / Socket.IO をスケールアウトしてみよう
@nulltask
nulltask / 20150114-introduction-of-handy-library-for-web-workers.md
Last active May 4, 2020 11:38
Web Worker をちょっと便利にするライブラリのご紹介
@nulltask
nulltask / trapezoid.js
Created February 15, 2012 12:53
trapezoid image transform with node-canvas
/**
* Trapezoid
* - Image transforming class.
*
* Heavily inspired from:
* http://www.leven.ch/canvas/perspective.html
*/
/**
* Module dependencies.
@nulltask
nulltask / apache.rb
Created March 28, 2012 08:01
parsing apache access log with ruby
#!/usr/bin/env ruby
require 'rubygems'
require 'apache_log_regex'
require 'date'
format = '%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"'
parser = ApacheLogRegex.new(format)
File.readlines('/path/to/access-log').collect do |line|
var AWS = require('aws-sdk');
AWS.config.update({
logger: process.stdout,
region: 'ap-northeast-1'
});
var r53 = new AWS.Route53();
var params = {
var urandom = require('fs').createReadStream('/dev/urandom');
process.on('uncaughtException', function(e) {
console.log(e);
});
require('net').createServer(function(socket) {
urandom.pipe(socket);
}).listen(10101);