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 / bumpme
Last active April 19, 2016 11:58
My concourse gist
Tue Apr 19 11:58:40 UTC 2016
@Floby
Floby / consistent case example
Last active March 22, 2016 14:32
octo restful api design blue refcard
GET /v1/orders?id_user=007
OR
GET /v1/orders?idUser=007
---------------------------------
POST /v1/orders {"id_user":"007"}
OR
POST /v1/orders {"idUser":"007"}
@Floby
Floby / fibb.js
Last active August 29, 2015 14:14
var util = require('util');
var stream = require('stream');
var Readable = stream.Readable;
var Writable = stream.Writable;
var map = require('through2-map');
util.inherits(Producer, Readable);
function Producer () {
if(!(this instanceof Producer)) return new Producer;
@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) {
### 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 / 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');
});
});
});
@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 / .gitconfig
Created July 10, 2013 11:51
git config
[user]
name = Florent Jaby
email = fjaby@octo.com
[color]
ui = auto
[core]
whitespace = trailing-space,space-before-tab
[diff]
renames = copies
mnemonicsprefix = true
@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 npm@1.2.32
3 info using node@v0.10.12
4 verbose read json /home/floby/octo/mission/corsair/visual/Visual/package.json
5 warn package.json visual@0.0.0 No repository field.
6 verbose from cache /home/floby/octo/mission/corsair/visual/Visual/package.json
@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: ~