This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const compile = (input, helpers, thisArg) => { | |
return async data => { | |
let ctx = { ...thisArg, ...data }; | |
let keys = []; | |
let vals = []; | |
if (helpers) { | |
for (let key of Object.keys(helpers)) { | |
if (ctx[key] === void 0) { | |
ctx[key] = (...args) => helpers[key].call(ctx, ...args); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.13333329558372498</real> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const countdown = (msgFn, fn, count = 3, interval = 500) => { | |
let timer = setInterval(() => { | |
process.stdout.write('\u001b[?25l'); | |
process.stdout.write('\u001b[2K\r'); | |
process.stdout.write(msgFn(count)); | |
if (count-- === 0) { | |
process.stdout.write('\u001b[?25h'); | |
process.stdout.write('\u001b[2K\r'); | |
clearInterval(timer); | |
fn(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Suite } = require('benchmark'); | |
const argv = require('minimist')(process.argv.slice(2)); | |
const cycle = (e, newline) => { | |
process.stdout.write('\u001b[G'); | |
process.stdout.write(` ${e.target}` + (newline ? '\n' : '')); | |
}; | |
function bench(name) { | |
const suite = new Suite() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const longest = arr => arr.reduce((len, v) => Math.max(v.length, len), 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async function() { | |
const handlebars = require('handlebars'); | |
const engine = require('./examples/support/engine'); | |
const Assemble = require('./'); | |
const app = new Assemble(); | |
app.engine('hbs', engine(handlebars)); | |
const pages = app.create('pages'); | |
const layouts = app.create('layouts', { kind: 'layout' }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const path = require('path'); | |
const Collection = require('../lib/collection'); | |
const collection = new Collection(); | |
collection.use(loader()); | |
const filter = file => file.extname === '.txt'; | |
const contents = file => fs.readFileSync(file.path); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = [ | |
'014a', | |
'0x706272', | |
'13steinj', | |
'2bdb2', | |
'_3442', | |
'__crackers__', | |
'_selfishPersonReborn', | |
'a_redditor', | |
'Aceeri', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
read -p "Username: " username | |
for f in packages/*; do | |
package=`basename $f` | |
if [ -d "$f" ]; then | |
npm owner add $username $package |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Jon Schlinkert", | |
"email": "[email protected]", | |
"github": "jonschlinkert", | |
"linkedin": "jonschlinkert", | |
"twitter": "jonschlinkert", | |
"npm": "jonschlinkert" | |
} |