#Sublime Text 2 Shortcuts
###Legend
| key | symbol |
|---|---|
| ctrl | ⎈ |
| shift | ⇧ |
| alt | ⎇ |
| tab | ↹ |
| /* COMMON */ | |
| /*background*/ | |
| .type-html, | |
| .type-css, | |
| .type-javascript, | |
| .type-html .highlight, | |
| .type-css .highlight, | |
| .type-javascript .highlight, |
| var fs = require('fs'), | |
| path = require('path'); | |
| var dir = null, file = null; | |
| exports.readdirr = function (dpath, cb) { | |
| dir = [], file = []; | |
| dir.push(dpath); |
| var moment = require('moment'); | |
| moment.fn.isISO = true; | |
| moment.fn.dayISO = function () { | |
| var self = this.clone(); | |
| return self.day() == 0 ? 6 : self.day()-1; | |
| } |
| function list (step, end) { | |
| function loop (index) { | |
| if (index == 10) return end(); | |
| step(index, function next () { | |
| loop(++index); | |
| }); | |
| } | |
| loop(0); | |
| } |
| function chain () { | |
| var funcs = arguments; | |
| return function (args, cb) { | |
| (function next (index) { | |
| if (index == funcs.length) return cb(); | |
| funcs[index](args, function (err) { | |
| if (err) return cb(err); | |
| next(++index); | |
| }); |
#Sublime Text 2 Shortcuts
###Legend
| key | symbol |
|---|---|
| ctrl | ⎈ |
| shift | ⇧ |
| alt | ⎇ |
| tab | ↹ |
| var fs = require('fs') | |
| , path = require('path') | |
| , co = require('co') | |
| , thunkify = require('thunkify') | |
| , readdir = thunkify(fs.readdir) | |
| , stat = thunkify(fs.stat) | |
| var recursive = co.wrap(function* (root) { | |
| var dirs = [], files = [] |
| let fs = require('fs') | |
| , path = require('path') | |
| , bluebird = require('bluebird') | |
| , readdir = bluebird.promisify(fs.readdir) | |
| , stat = bluebird.promisify(fs.stat) | |
| let recursive = async (root) => { | |
| let dirs = [], files = [] | |
| dirs.push(root) |
| var file1 = require('./file1') | |
| var file2 = require('./file2') |
| import fs from 'fs' | |
| import path from 'path' | |
| import stream from 'stream' | |
| import bluebird from 'bluebird' | |
| bluebird.promisifyAll(fs) | |
| class Readdirr extends stream.Readable { | |
| constructor(root) { |