Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
VPATH=/usr/local/bin | |
BINARIES=ruby node | |
all : ${BINARIES} | |
echo "Deps are installed" | |
${BINARIES} : | |
asdf plugin-add $@ |
WeeChat terminal IRC client
Puts on glasses: | |
(•_•) | |
( •_•)>⌐■-■ | |
(⌐■_■) | |
Takes off glasses ("mother of god..."): | |
(⌐■_■) | |
( •_•)>⌐■-■ |
////////////////////////////////////////////////////////////// | |
// This uses the Reg Replace plugin in Sublime Text 2 to find | |
// all named CSS color values and replace them | |
// with their equivalent hex value. | |
// | |
// Install the Reg Replace plugin | |
// using the Package Control Plugin | |
// http://wbond.net/sublime_packages/package_control | |
// | |
// Github RegReplace plugin page : |
#!/usr/bin/ruby | |
# encoding: utf-8 | |
# | |
# Updated 2017-10-25: | |
# - Defaults to large size (512) | |
# - If ImageMagick is installed: | |
# - rounds the corners (copped from @bradjasper, https://github.com/bradjasper/Download-iTunes-Icon/blob/master/itunesicon.rb) | |
# - replace original with rounded version, converting to png if necessary | |
# | |
# Retrieve an iOS app icon at the highest available resolution |
# JS Lint | |
# Reference: http://blog.simplytestable.com/installing-jslint-for-command-line-use-on-ubuntu/ | |
function jslint { | |
filename=${1##*/} # Name of file. | |
dir="/Users/Jesse/Desktop/" # Directory where you want your lint files output. Must be full path. No ~. | |
path="$dir$filename-lint.js" | |
/usr/local/bin/node /usr/share/node-jslint/node_modules/jslint/bin/jslint.js "$1" > "$path" | |
} |
// [Sieve of Eratosthenes](http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes) | |
var getPrimes = function (max) { | |
"use strict"; | |
var sieve = [], | |
primes = []; | |
for (var i = 2; i <= max; i += 1) { | |
if (!sieve[i]) { | |
primes.push(i); |