Skip to content

Instantly share code, notes, and snippets.

View Floby's full-sized avatar
🐮
Moo

Florent Jaby Floby

🐮
Moo
View GitHub Profile
@Floby
Floby / gist:4980532
Created February 18, 2013 20:43
Ouput of make for cancer_wm
$ make
cancer_wm.c: In function ‘main’:
cancer_wm.c:29:5: warning: ISO C90 forbids mixed declarations and code [-pedantic]
cancer_wm.c:33:18: warning: assignment makes integer from pointer without a cast [enabled by default]
cancer_wm.c:213:17: warning: enumeration value ‘_’ not handled in switch [-Wswitch]
cancer_wm.c:259:30: warning: assignment makes integer from pointer without a cast [enabled by default]
cancer_wm.c:285:55: warning: ‘start.button’ may be used uninitialized in this function [-Wmaybe-uninitialized]
cancer_wm.c:283:19: warning: ‘start.y_root’ may be used uninitialized in this function [-Wmaybe-uninitialized]
cancer_wm.c:282:19: warning: ‘start.x_root’ may be used uninitialized in this function [-Wmaybe-uninitialized]
cancer_wm.c:153:29: warning: ‘*((void *)&order+4)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
@Floby
Floby / FileStream.js
Last active December 14, 2015 09:19
A combination of streams to read the contents of the files from a directory This was an answer to a StackOverflow question. You can now use my module at http://github.com/floby/node-catstream
var zlib = require('zlib');
var util = require('util');
var fs = require('fs');
var stream = require('stream');
var async = require('async');
function FileStream (transform, encoding) {
stream.Stream.apply(this);
@Floby
Floby / Queue.js
Last active December 15, 2015 06:09
a queue?
function Queue () {
if(!(this instanceof Queue)) return new Queue();
}
Queue.prototype.push = function push(e) {
return this._q.unshift(e);
};
Queue.prototype.shift = function shift() {
return this._q.pop();
@Floby
Floby / gist:5253353
Created March 27, 2013 10:53
npm test output for shux
> tap test/*.js
not ok test/sh.js ....................................... 1/3
Command: "node" "sh.js"
TAP version 13
not ok 1 TypeError: Unsupported fd type: TTY
---
type: TypeError
message: Unsupported fd type: TTY
code: ~
@Floby
Floby / npm-debug.log
Created July 10, 2013 10:20
npm install grunt
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'grunt' ]
2 info using [email protected]
3 info using [email protected]
4 verbose read json /home/floby/octo/mission/corsair/visual/Visual/package.json
5 warn package.json [email protected] No repository field.
6 verbose from cache /home/floby/octo/mission/corsair/visual/Visual/package.json
@Floby
Floby / .gitconfig
Created July 10, 2013 11:51
git config
[user]
name = Florent Jaby
email = [email protected]
[color]
ui = auto
[core]
whitespace = trailing-space,space-before-tab
[diff]
renames = copies
mnemonicsprefix = true
@Floby
Floby / shoe-client.js
Created January 27, 2014 22:42
shoe client with actual 'ws' module
var util = require('util');
var ws = require('ws');
var DuplexStream = require('stream').Duplex;
var Stream = module.exports = function Stream(uri) {
if(!(this instanceof Stream)) return new Stream(uri);
DuplexStream.apply(this);
this.setEncoding('utf8');
this._connected = false;
this._writeQueue = [];
@Floby
Floby / router-example.js
Created May 19, 2014 17:42
Ember article
App.Router.map(function() {
this.resource('post', { path: '/post/:post_id' }, function() {
this.route('edit');
this.resource('comments', function() {
this.route('new');
});
});
});
### Keybase proof
I hereby claim:
* I am floby on github.
* I am floby (https://keybase.io/floby) on keybase.
* I have a public key whose fingerprint is FDD2 33DF BC30 CED5 471A F992 41C2 B498 488A 51CF
To claim this, I am signing this object:
@Floby
Floby / async.copy.js
Created August 29, 2014 09:17
Parallel in node.js (example with async and co https://github.com/visionmedia/co)
#!/usr/bin/env node
var fs = require('fs');
var async = require('async');
async.parallel([
copyFile.bind(null, 'resources/file1.txt', 'resources/file1_copy.txt'),
copyFile.bind(null, 'resources/file2.txt', 'resources/file2_copy.txt'),
copyFile.bind(null, 'resources/file3.txt', 'resources/file3_copy.txt')
], function (err, results) {