_________ _____ _______________ _____
\_ ___ \\ \\___________ \____ / ____\ ~/.bash/cliref.md
/ \ \/| | | || _/ __ \ __\ copy/paste from whatisdb
\ \___|__ |_|_ || | \ __/|_ | http://pastebin.com/yGmGiDQX
\________ /_____ \_||____|_ /____ /_| [email protected]
20140825 \/ \/ \/ \/
This file contains 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 | |
# script for optimizing images in a directory (recursive) | |
# pngcrush & jpegtran settings from: | |
# http://developer.yahoo.com/performance/rules.html#opt_images | |
# pngcrush | |
for png in `find $1 -iname "*.png"`; do | |
echo "crushing $png ..." | |
pngcrush -rem alla -reduce -brute "$png" temp.png |
This file contains 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
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
This file contains 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
/* gulpfile.js - https://github.com/wearefractal/gulp */ | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var coffee = require('gulp-coffee'); | |
var path = require('path'); | |
var srcCoffeeDir = './coffee/'; | |
var destDir = './src/'; |
This file contains 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
/* | |
From https://github.com/gulpjs/gulp/issues/101. Organize gulpfile.js using concept of environment variables. | |
1. Set up sub-tasks to behave in a certain according to env var; may be env agnostic. | |
2. Set up high-level tasks to run a group of sub-tasks to orchestrate a behaviour (testing, staging, prod, etc) | |
*/ | |
var R = 0; | |
var ENV_SWITCH = void 0; |
This file contains 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
# npm publish with goodies | |
# `np` with an optional argument `patch`/`minor`/`major`/`<version>` | |
# defaults to `patch` | |
np() { | |
trash node_modules &>/dev/null; | |
git pull --rebase && \ | |
npm install && \ | |
npm test && \ | |
npm version ${1:=patch} && \ | |
npm publish && \ |
This file contains 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
var mori = require("mori"); | |
function Calendar(appointments, previousCalendar) { | |
appointments = appointments; | |
var cal = {}; | |
cal.add = function(appointment) { | |
var withAppointments = mori.conj(appointments, appointment); | |
return Calendar(withAppointments, cal); |
This file contains 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
"use strict"; | |
/** | |
* Deps: | |
* npm install benchmark EventEmitter3 | |
*/ | |
var EventEmitter = require('events').EventEmitter; | |
var bus = new EventEmitter(); | |
function nextTick(callback) { | |
// setTimeout(callback, 0); |
This file contains 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
var structure = immstruct({turtles: []}); | |
var TurtlesComponent = React.createClass({ | |
componentWillMount: function() { | |
this.setState({turtlesCursor: structure.cursor()} | |
structure.on('swap', () => | |
this.setState({turtlesCursor: structure.cursor()})); |
This file contains 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
// custom jshint-loader reporter | |
// Based on https://github.com/sindresorhus/jshint-stylish | |
var | |
beeper = require('beeper'), | |
chalk = require('chalk'), | |
table = require('text-table'), | |
stringLength = require('string-length'), | |
logSymbols = require('log-symbols'); | |
function pluralize(str, count) { |
OlderNewer