This file contains 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
#!/usr/bin/env ruby | |
# reccursively scan the rootdir directory | |
# - if a block is given, the fullpath are yielded. They are kept IIF the block return true | |
# - Find.find and Dir dont follow symlinks. BUT this one does | |
def dir_scan(rootdir, &block) | |
results = [] | |
dirnames = [] | |
Dir.entries(rootdir).each do |entry| | |
next if entry == "." |
This file contains 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
#!/usr/bin/env ruby | |
# system of template which are based on mustache | |
# - http://mustache.github.com/ | |
# - it seems serious work. Just i dont like to have more dependancies | |
module TemplateEzmustache | |
def self.patch(template, variables) | |
variables.each { |key, val| | |
template.gsub!("{{#{key}}}", val) | |
} |
This file contains 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
$ cat .asoundrc | |
pcm.!default iec958:U0xccd0x77 | |
TO GET ARECORD (good to test if mic work) | |
$ arecord -fcd -Dplughw:U0xccd0x77 -vv /dev/null | |
- apparently this is hard to put that in the .asoundrc | |
TO GET OUTPUT DEVICE | |
$ aplay -L |
This file contains 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
#!/usr/local/bin/node | |
var sys = require('sys'), | |
http = require('http'), | |
querystring = require('querystring'), | |
base64 = require('./lib/base64'), | |
Buffer = require('buffer').Buffer, | |
Irc = require('./vendor/IRC/lib/irc'); | |
var twitter_auth = { user: "<YOUR_TWITTER_USERNAME>", pass: "<YOUR_TWITTER_PASSWORD>"}; |
This file contains 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
From 25844820ac27eecad46bbf98841c9b97a3b784d6 Mon Sep 17 00:00:00 2001 | |
From: Jerome Etienne <[email protected]> | |
Date: Wed, 7 Jul 2010 11:58:33 +0200 | |
Subject: [PATCH] Support of console.dir + console.assert | |
--- | |
src/node.js | 11 +++++++++++ | |
1 files changed, 11 insertions(+), 0 deletions(-) | |
diff --git a/src/node.js b/src/node.js |
This file contains 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
From 2fc85ee6b1b5dbc78328f94b539340dc2e15c1fc Mon Sep 17 00:00:00 2001 | |
From: Jerome Etienne <[email protected]> | |
Date: Tue, 3 Aug 2010 21:15:19 +0200 | |
Subject: [PATCH] Support of console.log %o + append unparsed params + noparam-ok | |
--- | |
src/node.js | 8 +++++--- | |
1 files changed, 5 insertions(+), 3 deletions(-) | |
diff --git a/src/node.js b/src/node.js |
This file contains 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
From a66f80208c56e6677073965ca799763958d514ff Mon Sep 17 00:00:00 2001 | |
From: Jerome Etienne <[email protected]> | |
Date: Tue, 3 Aug 2010 17:08:02 +0200 | |
Subject: [PATCH] Support of console.trace() | |
--- | |
src/node.js | 5 +++++ | |
1 files changed, 5 insertions(+), 0 deletions(-) | |
diff --git a/src/node.js b/src/node.js |
This file contains 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
// You can generate the privatekey.pem and certificate.pem files using the following commands: | |
// | |
// openssl genrsa -out privatekey.pem 1024 | |
// openssl req -new -key privatekey.pem -out certrequest.csr | |
// openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem | |
const crypto = require('crypto'), | |
fs = require("fs"), | |
http = require("http"); |
This file contains 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
jerome@jmebox:/tmp/sloti$ cat A.js | |
console.log("foo"); | |
jerome@jmebox:/tmp/sloti$ cat a.js | |
require('./A'); | |
jerome@jmebox:/tmp/sloti$ cat b.js | |
require("./a"); | |
require("./A"); | |
jerome@jmebox:/tmp/sloti$ node b.js | |
foo |
This file contains 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
jerome@jmebox:/tmp/slotu$ cat A.js | |
var hello = 42; | |
exports.hello = hello; | |
jerome@jmebox:/tmp/slotu$ cat a.js | |
require('./A').hello = "hello"; | |
jerome@jmebox:/tmp/slotu$ cat b.js | |
require("./a"); | |
console.log(require("./A").hello); | |
jerome@jmebox:/tmp/slotu$ node b.js | |
hello |
OlderNewer