A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
" Notes: | |
" (1) To enhance the ergonomics of this sufficiently to make it practical, at | |
" least, until your brain grows a new lobe dedicated to counting line offsets | |
" in the background while you work, you should either make sure you have | |
" something like the following in your `~/.vimrc`: | |
" | |
" set number | |
" if has('autocmd') | |
" augroup vimrc_linenumbering | |
" autocmd! |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
module.exports = function(configuration) { | |
var configuredInstance = createInstance(configuration); | |
return function(argOne, argTwo) { | |
configuredInstance.doThing(argOne) | |
return configuredInstance.doAnotherThing(argTwo); | |
} | |
} |
'use strict'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
require('util').inherits(module.exports, Error); |
// array utils | |
// ================================================================================================= | |
const combine = (...arrays) => [].concat(...arrays); | |
const compact = arr => arr.filter(Boolean); | |
const contains = (() => Array.prototype.includes | |
? (arr, value) => arr.includes(value) | |
: (arr, value) => arr.some(el => el === value) |
'use strict'; | |
var users = require('../sample_users'); | |
exports.seed = function(knex, Promise) { | |
var userPromises = []; | |
users.forEach(function(user){ | |
userPromises.push(createUser(knex, user)); | |
}); | |
return Promise.all(userPromises); | |
}; |
/* Without using express-promise-router... | |
* If either of the two Promise-returning methods ends up failing (ie. rejecting), | |
* an uncaught exception will be printed to stdout, and the client will never get | |
* a response - instead, they'll be stuck on an infinitely loading page. | |
*/ | |
express = require("express").router(); | |
router.get("/", function(req, res) { | |
Promise.try(function(){ |
# Steps to build and install tmux from source. | |
# Takes < 25 seconds on EC2 env [even on a low-end config instance]. | |
VERSION=2.7 | |
sudo yum -y remove tmux | |
sudo yum -y install wget tar libevent-devel ncurses-devel | |
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz | |
tar xzf tmux-${VERSION}.tar.gz | |
rm -f tmux-${VERSION}.tar.gz | |
cd tmux-${VERSION} |