Skip to content

Instantly share code, notes, and snippets.

View bobpoekert's full-sized avatar
🗿
.

Bob Poekert bobpoekert

🗿
.
View GitHub Profile
@bobpoekert
bobpoekert / gist:673274
Created November 11, 2010 21:57
node tail
var tail = function(fname, onData) {
fs.open(fname, 'a+', function(err, fd) {
puts('fd:'+fd);
if (err) {
puts('error!: '+err);
setTimeout(function(){
tail(fname, onData);
}, 10);
} else {
puts('allocating buffer');
@bobpoekert
bobpoekert / gist:648354
Created October 27, 2010 03:07
Justin.tv Javascript Api Example
player = jtv_api.new_player(document.getElementById('video_container'), {
width:'100%',
height:'100%',
custom:true,
consumer_key:'yjw6J88EzQ2kCj8NhBXA',
events : {
stream_lost : play_random,
video_not_found : play_random,
}
});