Skip to content

Instantly share code, notes, and snippets.

grepless() { GREP_COLOR="01;34" grep --color=always "$@" | less -R; }
## Colorize the ls output ##
# alias ls='ls -G'
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
## Use a long listing format ##
alias ll='ls -la'
## get rid of command not found ##
alias cd..='cd ..'
node -e 'console.log(JSON.parse(require("fs").readFileSync("package.json")).delay || 3000)'
var gulp = require('gulp');
var traceur = require('gulp-traceur');
var sourcemaps = require('gulp-sourcemaps');
var header = require('gulp-header');
var removeLines = require('gulp-remove-lines');
var browserify = require('browserify');
var map = require('vinyl-map');
var buffer = require('vinyl-buffer');
var source = require('vinyl-source-stream');
var path = require('path');
@kolodny
kolodny / get-events.js
Last active August 29, 2015 14:08
get-events
var HTMLElements = [
'HTMLAllCollection',
'HTMLAnchorElement',
'HTMLAppletElement',
'HTMLAreaElement',
'HTMLAudioElement',
'HTMLBRElement',
'HTMLBaseElement',
'HTMLBodyElement',
'HTMLButtonElement',
@kolodny
kolodny / hateoas.js
Last active August 29, 2015 14:09
Hateoas Example API
var createTicker(fn, startingTicks) {
var tickCount = startingTicks || 0;
var ran;
return function() {
tickCount++;
return function() {
tickCount--;
if (tickCount <= 0 && !ran) {
ran = true;
fn();
Operating system: Linux
0.0.0 Linux 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64
CPU: amd64
family 6 model 30 stepping 5
1 CPU
Crash reason: SIGSEGV
Crash address: 0xffffffffffffffc8
Thread 0 (crashed)
@kolodny
kolodny / b.js
Last active August 29, 2015 14:11
Cordova package.json `(npm install -g serve browserify watchify reactify serve)`
var fs = require('fs');
var cp = require('child_process');
cp.exec('npm -g root', function(_, root) {
root = root.trim();
var browserify = require(root + '/browserify');
var watchify = require(root + '/watchify');
var es6ify = require(root + '/es6ify');
var reactify = require(root + '/reactify');
var watchifyArgs = watchify.args;
var {a,b} = {a: 22, b: 33};
module.exports = {modName:'a'};
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
What Where
NW cheatcheat https://gentlenode.com/journal/node-webkit-1-complete-cheatsheet/26