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
qx.Class.define("project.form.DateTimeField", | |
{ | |
extend : qx.ui.form.DateField, | |
construct : function() | |
{ | |
this.base(arguments); | |
this.setDateFormat( new qx.util.format.DateFormat("M/d/yy h:mma")); | |
}, |
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
app.use(express.compiler({ | |
src : __dirname + '/views/style' | |
, dest: __dirname + '/../public/style' | |
, enable: ['less'] | |
})); |
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
var stream = request('http://example.com/video.mp4'); // doesnt work | |
var stream = fs.createReadStream(__dirname +'/video.mp4'); // works | |
var proc = new ffmpeg(stream); | |
.usingPreset('flashvideo') | |
.writeToStream(res, function(retcode, err){ | |
if(err) throw err; | |
console.log('file has been converted succesfully'); | |
}); |
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
example_user = { | |
// a list of 0 or more group ids of the groups this user belongs to | |
_groups : [_group1ID,_group2ID,...] | |
// a list of 0 or more roles | |
, roles : ['user','admin'...] | |
, fname : 'Some' | |
, lname : 'User' | |
, prettyUsername : 'UsEr' | |
, username : 'user' | |
, email : '[email protected]' |
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
Good code is innovative | |
Good code makes a library useful | |
Good code is aesthetic | |
Good code makes a library understandable | |
Good code is unobtrusive |
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
// My first attempt at a style guide: | |
// 2 character spaces (no tabs!) | |
// ' > " | |
// no semis! (yeah, i said it.) | |
// operators: | |
// (where foo and bar have been declared previously) | |
foo = 2 |
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
var Hook = require('hook.io').Hook | |
, is_master = false | |
var hook = new Hook({ | |
name : 'hook' | |
, type : 'victor' | |
, autoheal : true | |
}); | |
hook.on('*::rank::accepting',function(data){ |
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
require('fs').createReadStream(process.argv[1]).pipe(process.stdout); |
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
var http = require('http') | |
, util = require('util') | |
, pwd = '/Users/victor/Downloads/images' | |
, fs = require('fs') | |
, mfds = 1024 // max open file descritors | |
, ofds = 0 | |
, memwatch = require('memwatch') | |
, _ = require('underscore') | |
function copyFiles(){ |
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
# The number of milliseconds of each tick | |
tickTime=2000 | |
# The number of ticks that the initial | |
# synchronization phase can take | |
initLimit=10 | |
# The number of ticks that can pass between | |
# sending a request and getting an acknowledgement | |
syncLimit=5 | |
# the directory where the snapshot is stored. | |
# do not use /tmp for storage, /tmp here is just |
OlderNewer