Skip to content

Instantly share code, notes, and snippets.

1 x 12 = _ 12_ | 1 x 9 = _ 9_
2 x 4 = _ 8_ | 2 x 5 = _ 10_
3 x 11 = _ 33_ | 3 x 7 = _ 21_
4 x 8 = _ 32_ | 4 x 5 = _ 20_
5 x 7 = _ 35_ | 5 x 12 = _ 60_
6 x 3 = _ 18_ | 6 x 11 = _ 66_
7 x 10 = _ 70_ | 7 x 3 = _ 21_
8 x 8 = _ 64_ | 8 x 11 = _ 88_
9 x 10 = _ 90_ | 9 x 9 = _ 81_
10 x 11 = _110_ | 10 x 11 = _110_
# mix compile; mix firmware; mix firmware.burn
defmodule HelloNerves do
def start(_type, _args) do
exec = "#{:code.priv_dir(:nerves_neopixel)}/rpi_ws281x"
port = Port.open({:spawn_executable, exec}, [{:args, ["18", "1", "24", "1"]}, {:packet, 2}, :use_stdio, :binary])
send port, {self, {:command, :erlang.term_to_binary( {0, {254, <<254::size(8), 254::size(8), 254::size(8), 0x00::size(8)>> }} )}}
:timer.sleep 1000
@clr
clr / romnum.erl
Created January 22, 2015 02:04
Roman Numeral ErlangGames
-module(romnum).
-include_lib("eunit/include/eunit.hrl").
-export([math/3]).
math_test_() ->
[
?_assertEqual("III", math("II", "+", "I")),
?_assertEqual("MMXX", math("MMXV", "+", "V")),
?_assertEqual("MMXX", math("V", "+", "MMXV")),
?_assertEqual("MCMLXXXII", math("MMXXXII", "-", "L"))
#!/bin/bash
time \
grep --line-buffered < "$1" 'BoxUsage' | \
awk '{FS =","}{print $10,$22}' | \
grep 'BoxUsage' | \
sort | \
uniq | \
awk '{print $1}' | \
sort | \

Keybase proof

I hereby claim:

  • I am clr on github.
  • I am clr (https://keybase.io/clr) on keybase.
  • I have a public key whose fingerprint is 8D17 9A05 FFC4 87FB 3CD2 0339 B049 20F4 7783 16DF

To claim this, I am signing this object:

Casey Rosenthal
2:40 PM
k
what would be a good platform for ProServ to ask some questions?
like
are Links dead? can we deprecate them?
2i => we end up frequently recommending clients *not* use 2i, and implement a term-based inverted index instead
Epic Redmond
2:42 PM
I'd love to. I didn't even want to put them in the docs
@clr
clr / gist:5605122
Created May 18, 2013 17:00
Install basho_bench from RPM
[basho-proserv]
name=Basho Proserv Packages for Enterprise Linux 6 - $basearch
baseurl=https://s3.amazonaws.com/basho-proserv-benchmarking/yum/el/6/tools/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
curl -X PUT http://127.0.0.1:8091/buckets/statefarm_2i/keys/apple \
-H 'x-riak-index-category_bin: fruit' \
-H 'Content-Type: text/plain' \
-d 'malus domestica'
curl -X PUT http://127.0.0.1:8091/buckets/statefarm_2i/keys/banana \
-H 'x-riak-index-category_bin: fruit' \
-H 'Content-Type: text/plain' \
-d 'musa acuminata'
@clr
clr / riak_basic.txt
Created November 6, 2012 05:34
Basic Querying Examples
curl -X PUT http://127.0.0.1:8091/buckets/qcon/keys/nosql4evah \
-H 'content-type: text/plain' \
-d $'Scale out all the things!\n'
curl -X GET http://127.0.0.1:8091/buckets/qcon/keys/nosql4evah
curl -X DELETE http://127.0.0.1:8091/buckets/qcon/keys/nosql4evah
curl -X GET http://127.0.0.1:8091/buckets/qcon/keys/nosql4evah
@clr
clr / access.log
Created October 30, 2012 22:21
Wide Finder ErlangGames
208.115.113.86 - - [29/Oct/2012:17:11:45 -0700] "GET /Case%20History/new_page_1.htm HTTP/1.1" 404 89 "-" "Mozilla/5.0 (compatible; Ezooms/1.0; [email protected])" "dakotalargeanimalclinic.com"
218.30.103.53 - - [29/Oct/2012:17:37:02 -0700] "GET /robots.txt HTTP/1.1" 200 54 "-" "Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)" "www.dakotalargeanimalclinic.com"
208.115.111.70 - - [29/Oct/2012:17:46:47 -0700] "GET /robots.txt HTTP/1.1" 200 54 "-" "Mozilla/5.0 (compatible; Ezooms/1.0; [email protected])" "dakotalargeanimalclinic.com"
74.125.182.28 - - [29/Oct/2012:17:54:04 -0700] "GET /Equine_Nutrition/teeth_check_horse.html HTTP/1.1" 200 4111 "http://www.google.com/search" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko; Google Web Preview) Chrome/22.0.1229 Safari/537.4" "www.dakotalargeanimalclinic.com"
70.238.130.51 - - [29/Oct/2012:17:54:04 -0700] "GET /photo_gallery/black_cat_mouth_open.JPG HTTP/1.1" 200 632815 "http://www.google.com/search?num=10&hl=en&sit