Skip to content

Instantly share code, notes, and snippets.

View gertoe's full-sized avatar

Gerrit Toehgiono gertoe

View GitHub Profile
@gertoe
gertoe / .block
Created May 26, 2018 18:39 — forked from mbostock/.block
Digital Clock
license: gpl-3.0
#!/bin/sh -x ## or just ` curl -Ls http://git.io/vRozn | sh `.
## Downloads the Mac OS X 10.10 Recovery Partition update,
## Copy's over the 10.10 version of Disk Utility.app, then
## use git to apply a binary patch so it will run on 10.11+.
cd /tmp
rm -rf DU1010
mkdir DU1010
@gertoe
gertoe / url_encode.rb
Created February 25, 2017 16:03 — forked from jonsuh/url_encode.rb
Jekyll URL Encode
# _plugins/url_encode.rb
require 'liquid'
require 'uri'
# Percent encoding for URI conforming to RFC 3986.
# Ref: http://tools.ietf.org/html/rfc3986#page-12
module URLEncode
def url_encode(url)
return URI.escape(url, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
end