It ensures the jsdoc of your function is respected during execution. Check out the live demo.
var newFct = jsdocFunction(yourFct)
////////////////////////////////////////////////////////////////////////////////// | |
// console.log to screen | |
////////////////////////////////////////////////////////////////////////////////// | |
;(function(){ | |
var container = document.createElement('div') | |
container.dataset.name = 'consoleLogOnScreen' | |
container.style.width = '100%'; | |
container.style.height = '100%'; | |
container.style.position = 'absolute'; | |
container.style.fontSize = '100%'; |
It ensures the jsdoc of your function is respected during execution. Check out the live demo.
var newFct = jsdocFunction(yourFct)
// array of functions for the rendering loop | |
var onRenderFcts = []; | |
// Here you add your functions to the rendering loop. | |
// They will be executed in-order once per requestAnimationFrame() | |
onRenderFcts.push(function(now, delta){ | |
// now is the absolute time in millisecond | |
// delta is the delay between now and the last iteration | |
// put your code here. |
/** | |
* Hijack requestAnimationFrame. It can add preFunction or postFunction. | |
* | |
* @constructor | |
*/ | |
var RafHijacker = function(){ | |
var originalFct = requestAnimationFrame | |
var _this = this | |
this.preFunction = null | |
this.postFunction = null |
var data = { | |
foobar : 1234.56789 // NOTE: see the number | |
} | |
data = JSON.parse(JSON.stringify(data, function(key, value){ | |
if( typeof(value) !== 'number' ) return value; | |
// for number, keep at most 6 digits after dot | |
return Number( value.toFixed(6) ) | |
})) |
#!/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 == "." |
#!/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) | |
} |
$ 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 |
#!/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>"}; |