Skip to content

Instantly share code, notes, and snippets.

J. Whiteman jwhiteman

Block or report user

Report or block jwhiteman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jwhiteman
jwhiteman / gist:079fe77fc626d49c9f8a
Created Jul 18, 2014
immutable means immutable
View gist:079fe77fc626d49c9f8a
Gotcha with Erlang
v-kserl-v-02-code erl
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Eshell V5.10.4 (abort with ^G)
1> VALUE = fun() -> io:format("I have value!~n") end.
#Fun<erl_eval.20.80484245>
2> K = mykey.
mykey
@jwhiteman
jwhiteman / gist:3625a7479082e245bf71
Created May 15, 2014
Trolling twitter for 2-letter handles
View gist:3625a7479082e245bf71
require 'httparty'
include HTTParty
('aa'..'zz').select { |r|
sleep 0.20
puts "trying #{r}"
self.class.head("https://twitter.com/#{r}").code == 404
}
# => ['me', 'oh']
@jwhiteman
jwhiteman / gist:7634421
Last active Dec 29, 2015
notes on getting hadoop (both single node and a cluster) going on Ubuntu LTS; there are just notes to myself and have some gaps in them. Not meant to be a tutorial or a walkthrough.
View gist:7634421
sudo apt-get update
sudo apt-get install vim
# generate keys and copy them over
ssh-copy-id -i id_rsa.pub vagrant@hnclient # move node ssh key to the client
# update /etc/hosts on each node to know at least the master; the master about the slave nodes
# make sure master can ssh into localost
cat .ssh/id_rsa.pub >> .ssh/authorized_keys
# re-read: http://stackoverflow.com/questions/8872807/hadoop-datanodes-cannot-find-namenode
You can’t perform that action at this time.