Skip to content

Instantly share code, notes, and snippets.

View zeke's full-sized avatar
🍊
Busy! @-message me directly if I'm slow to respond.

Zeke Sikelianos zeke

🍊
Busy! @-message me directly if I'm slow to respond.
View GitHub Profile

The Story of NPM and Yarn

In the beginning there was NPM, and for a time it was good. Packages went forth and multiplied. The New Gods proclaimed the great demon Dependency Management had been slain. But The Old Gods knew better, for they had seen much and knew that the demon can never be killed, only held at bay.

The Old Gods were ignored. In the folly of a young age grew an abundance of packages and with them grew the scourge of dependency. In the depths beneath the earth, in a place beyond memory, the great demon stirred.

The first sign something was wrong was non-deterministic package version mismatches. “This is fine!” The New Gods declared. “A temporary setback, nothing more! We can fix it.” And so they introduced shrinkwrap, a lamp to combat the growing darkness.

But it proved to be too little, too late, and dusk continued to fall. The New Gods suffered their first major defeat at the [Battle of Left-pad](https://www.theregister.co.uk/2016/03/23/npm_left_

The Story of NPM and Yarn

In the beginning there was NPM, and for a time it was good. Packages went forth and multiplied. The New Gods proclaimed the great demon Dependency Management had been slain. But The Old Gods knew better, for they had seen much and knew that the demon can never be killed, only held at bay.

The Old Gods were ignored. In the folly of a young age grew an abundance of packages and with them grew the scourge of dependency. In the depths beneath the earth, in a place beyond memory, the great demon stirred.

The first sign something was wrong was non-deterministic package version mismatches. “This is fine!” The New Gods declared. “A temporary setback, nothing more! We can fix it.” And so they introduced shrinkwrap, a lamp to combat the growing darkness.

But it proved to be too little, too late, and dusk continued to fall. The New Gods suffered their first major defeat at the [Battle of Left-pad](https://www.theregister.co.uk/2016/03/23/npm_left_

@zeke
zeke / bestTextColor.js
Created December 21, 2015 19:55 — forked from jczaplew/bestTextColor.js
Best color for text on a background of a given hex color
/*
Variation of http://stackoverflow.com/a/11508164/1956065
Follow up to https://twitter.com/johnjcz/status/670365691329970176
Inspired by UI of http://www.colorhexa.com/
*/
function bestTextColor(hex) {
hex = hex.replace('#', '');
var bigint = parseInt(hex, 16);
@zeke
zeke / GIF-Screencast-OSX.md
Created November 8, 2015 01:43 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

npm () {
if [ "$1" = "publish" ]; then
dependency-check . && $(which npm) "$@"
else
$(which npm) "$@"
fi
}
@zeke
zeke / postgres
Created July 2, 2014 20:24 — forked from will/postgres
git clone https://github.com/postgres/postgres.git && cd postgres
./configure --prefix=/tmp/postgres --with-openssl --with-ossp-uuid --with-libs=/usr/local/opt/readline/lib/ --with-includes=/usr/local/opt/readline/include/
# skip the readline parts if you dont have readline installed but it makes `psql` better
make -sj8
make install
/tmp/postgres/bin/initdb /tmp/postgres/data
|- node_modules/
|- src/
|   |
|   |- index.js/ <----------- uses browserify so anything in node_modules is game for require()
|   |  |- index.js
|   |  '- foo.coffee
|   |
|   |- index.css/ <---------- uses topcoatify so anything in node_modules is game. how import/etc works needs consideration

| | |- index.css

@zeke
zeke / doit.sh
Created February 17, 2014 06:22 — forked from dirkk0/doit.sh
# Thanks to Joe McCann for Dillinger!!!!!
# https://github.com/joemccann/dillinger
# this script doesn't work just by itself, you need to
# insert uris and keys that get created by heroku, dropbox and github
####### heroku ######
# install heroku toolbelt
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
sudo apt-get update
sudo apt-get install libfreetype6 libfreetype6-dev libfontconfig
# /etc/apt/sources.list should contain these:
# deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
# deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
sudo echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
#!/usr/bin/env bash
error() {
printf "$1\n" >&2
exit 1
}
[[ $# -eq 0 ]] && error "Usage: `basename $0` hash column [row(s)]"
hash=${1?'Must provide Dataclip hash'}