Skip to content

Instantly share code, notes, and snippets.

From 87a1eb5c64fb14cc3d548b67337ae4ba37635233 Mon Sep 17 00:00:00 2001
From: Jxck <block.rxckin.beats@gmail.com>
Date: Sun, 17 Apr 2011 05:05:07 +0900
Subject: [PATCH] mod curl progress-bar option
---
nvm.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/nvm.sh b/nvm.sh
@Jxck
Jxck / sample.js
Created May 16, 2011 07:29
mongoose simple sample
var mongoose = require('../lib/mongoose')
, Schema = mongoose.Schema;
var db = mongoose.connect('mongodb://localhost:27017/mydb');
var User = new Schema({
name : String
, age : Number
});
@Jxck
Jxck / map.rb
Created May 26, 2011 15:55
Hadoop Streaming with Ruby
#!/usr/bin/env ruby
ARGF.each do |line|
line.chomp!
words = line.split(' ')
printf("%s,1\n", words[8])
end
@Jxck
Jxck / config.js
Created August 27, 2011 08:48
I want to configuration like this..
function noop(){};
function para() {
var list = arguments;
return function(req, res, next) {
var current = 0;
var len = list.length;
for (var i = 0; i < len; ++i) {
var fun = list[i];
fun(req, res, function() {
var hoge = {
num: 10,
twi: function(n, cb){
cb(n * 2);
},
add: function(a, cb){
this.twi(a, function(ans) {
cb(ans + this.num);
}.bind(this));
}
@Jxck
Jxck / .gitignore
Created September 24, 2011 07:01
show repository status of modules listed on https://github.com/joyent/node/wiki/modules
.DS_Store
@Jxck
Jxck / 01.mystream.js
Created December 3, 2011 06:27
Stream Sample for blog
var stream = require('stream')
, util = require('util')
, log = console.log.bind(console)
;
// 本来は 'drain','error','close','pipe' イベントが必要
function MyStream() {
this.writable = true;
this.buf = [];
}
みてもいいよ。
@Jxck
Jxck / .gitignore
Created February 27, 2012 15:39
Test WebSocket/Socket.IO over ELB
node_modules
@Jxck
Jxck / .gitignore
Created April 3, 2012 15:07
simple socket.io server
node_modules