Skip to content

Instantly share code, notes, and snippets.

View phated's full-sized avatar
🐢

Blaine Bublitz phated

🐢
View GitHub Profile
@phated
phated / gulpfile.js
Created July 13, 2014 17:29
example of extending inside gulp-data
var gulp = require('gulp'),
jade = require('gulp-jade'),
data = require('gulp-data'),
path = require('path'),
extend = require('util')._extend;
var getJsonData = function(file, cb) {
var jsonPath = './app/jade/' + path.basename(file.path) + '.json';
var meta = require(jsonPath);
var data = extend(meta, { "var1":"bla bla" });
var bach = require('bach/time');
bach.parallel(fn1, fn2, fn3)
bach.on('start')
bach.on('end')
task1 (parallel) running
|- task2 (series) 200ms
|- task3 (series) running
var hapi = require('hapi');
var plugin = require('./yourPlugin');
plugin.name = 'NameOfYourPlugin';
plugin.version = '0.0.0';
describe('test', function(){
var server;
beforeEach(function(done){
var node = require('when/node');
var net = require('net');
var RedisClient = require('redis').RedisClient;
var host = '127.0.0.1';
var port = 6379;
var commands = require('redis/lib/commands');
function PromisedRedisClient() {
RedisClient.apply(this, arguments);
}

Keybase proof

I hereby claim:

  • I am phated on github.
  • I am phated (https://keybase.io/phated) on keybase.
  • I have a public key whose fingerprint is 3BF0 7C12 A387 3D3B 8AE0 6A1C E87C D7F9 B27B CBF3

To claim this, I am signing this object:

function promiseLoop(count){
var promises = [];
_.times(count, function(){
promises.push(promiseReturningAPI());
});
return when.all(promises);
}
var gulp = require('gulp');
var rename = require('gulp-rename');
var renamed = [];
function addHash(dir, base, ext) {
var newName = dir + base + 'YOUR_HASH_THING_HERE' + ext;
renamed.push(newName);
return newName;
}
function task1(){
// some logic
}
function task2(){
task1();
// other logic
}
gulp.task('task1', task1);
2014-01-08 09:48:39 substack https://gist.github.com/substack/8313379
2014-01-08 09:48:39 substack Raynos: ^^^
2014-01-08 09:48:39 substack a task automation framework to go along with your http framework
2014-01-08 09:48:39 guybrush i knew you are into build-systems now there is the proof
2014-01-08 09:48:39 phated substack: are you an idiot by choice or do you just ignore everything that doesn't come from your own head?
2014-01-08 09:48:39 Raynos substack: :D
2014-01-08 09:48:39 Raynos substack: nice!
2014-01-08 09:48:39 substack phated: I can't understand why people don't just use bash or makefiles or write little scripts
2014-01-08 09:48:39 Raynos That is really good
2014-01-08 09:48:39 Raynos It's actually really good