This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PreferenceEI = 'I' | 'E'; | |
type PreferenceSN = 'S' | 'N'; | |
type PreferenceTF = 'T' | 'F'; | |
type PreferenceJP = 'J' | 'P'; | |
type Preference = PreferenceEI | PreferenceSN | PreferenceTF | PreferenceJP; | |
type Name = `${PreferenceEI}${PreferenceSN}${PreferenceTF}${PreferenceJP}`; | |
// type Name = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +jstapleton is my blockchain ID. https://onename.com/jstapleton |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# note that, I am not an expert ruby developer, so there is probably a more ruby way of doing this... | |
require 'awesome_print' | |
def freq(str) | |
str.downcase.split("").map.with_object({}) do |c,h| | |
(h[c] = h.fetch(c, 0) + 1) if c =~ /\w/ | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
preexec () { | |
DATE=`date +"%H:%M:%S on %Y-%m-%d"` | |
C=$(($COLUMNS-24)) | |
echo -e "\033[1A\033[${C}C ${fg[red]}${DATE}${reset_color}" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.synced_folder "~/.m2", "/home/vagrant/.m2" | |
if Vagrant.has_plugin?("vagrant-cachier") | |
# Configure cached packages to be shared between instances of the same base box. | |
# More info on the "Usage" link above | |
config.cache.scope = :box | |
config.cache.enable :generic, { | |
"www" => { cache_dir: "/var/cache/www" }, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'optparse' | |
require 'yaml' | |
require 'erubis' | |
options = {} | |
opt_parser = OptionParser.new do |opt| | |
opt.banner = "Usage: erb_renderer -c config.yml -f file.erb" | |
opt.on("-c", "--config FILE", "config file to use for data") do |conf| | |
options[:config] = conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am tasermonkey on github. | |
* I am jstapleton (https://keybase.io/jstapleton) on keybase. | |
* I have a public key whose fingerprint is AFC8 AE95 9C2E FD84 04D6 D4B1 DDC6 5FF1 3230 1B95 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mac OSX: | |
listening () { | |
lsof -Pni | grep '(LISTEN)' | awk 'BEGIN {printf "%-15s %5s %21s\n", "Command", "PID", "PORT"} {printf "%-15s %5s %21s\n", $1,$2,$9}' | |
} | |
Linux (if you want non-you processes that are listening): | |
listening () { | |
sudo lsof -Pni | grep '(LISTEN)' | awk 'BEGIN {printf "%-15s %5s %21s\n", "Command", "PID", "PORT"} {printf "%-15s %5s %21s\n", $1,$2,$9}' | |
} |