Skip to content

Instantly share code, notes, and snippets.

View yoshuawuyts's full-sized avatar

Yosh yoshuawuyts

View GitHub Profile
var gulp = require('gulp');
var stylus = require('gulp-stylus');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
gulp.task('stylus', function(){
gulp.src('assets/stylus/main.styl')
.pipe(stylus({
use: ['nib'],
body {
box-sizing: border-box;
margin: -3;
}
.one {
height: 20%;
width: 25%;
background-color: #eee;
display: inline-block;
var gulp = require('gulp');
var stylus = require('gulp-stylus');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
gulp.task('stylus', function(){
gulp.src('assets/stylus/main.styl')
.pipe(stylus({
use: ['nib'],

why ./task.js?

One word: task automation. It's basically zero effort and you can use the ./task.js package manager to handle any repetitive tasks. You can use ./task.js to automate everything with minimum effort.

./task.js provides the structure, order, and authority that you as a developer so desperately crave. ./task.js will also take responsibility for your actions if you need it to. It's what everybody is using now. ./task.js is the new hotness. It's all about ./task.js now, just like that.

This is compared to npm run/bash scripts, which are:

@yoshuawuyts
yoshuawuyts / designdoc.md
Last active January 3, 2016 09:59
Zookeeper design doc

Zookeeper design doc

This document is split into the following sections:

Goals

The primary goal of building Zookeeper is to explore the client side MVC structure of Backbone, amplified with Facebook's React. Secondly we're going to attempt to handle Koa (node generators/yield framework) and wrap the Dropbox API to consume it as a service. Zookeeper will be built according to the RAPHT module pattern.

/**
* POST to create a new user.
*/
exports.create = function *(){
var body = yield parse(this);
// password
var pass = body.password;
assert(pass, 400, 'password is required');
require.config({
baseUrl: '/backbone-tests/',
paths: {
'jquery' : '/app/libs/jquery',
'underscore' : '/app/libs/underscore',
'backbone' : '/app/libs/backbone',
'mocha' : 'libs/mocha',
'chai' : 'libs/chai',
'chai-jquery' : 'libs/chai-jquery',
'models' : '/app/models'
var Counter = React.createClass({
getInitialState: function() {
window.aCounter = this;
return {
count: 0
};
},
add: function() {
this.setState({count: this.state.count+1});
@yoshuawuyts
yoshuawuyts / lsZshOptions.txt
Created February 6, 2014 23:12
zsh ls options
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
--author with -l, print the author of each file
-b, --escape print C-style escapes for nongraphic characters
--block-size=SIZE scale sizes by SIZE before printing them. E.g.,
`--block-size=M' prints sizes in units of
1,048,576 bytes. See SIZE format below.
-B, --ignore-backups do not list implied entries ending with ~
-c with -lt: sort by, and show, ctime (time of last
@yoshuawuyts
yoshuawuyts / error.md
Created February 17, 2014 16:32
edititem linkButton.clickHandler: Cannot call method 'preventDefault' of undefined react-0.8.0-min.js:7276 Uncaught TypeError: Cannot call method 'preventDefault' of undefined linkComponent.js:7
edititem linkButton.clickHandler: Cannot call method 'preventDefault' of undefined react-0.8.0-min.js:7276
Uncaught TypeError: Cannot call method 'preventDefault' of undefined linkComponent.js:7