Skip to content

Instantly share code, notes, and snippets.

View blt's full-sized avatar

Brian L. Troutwine blt

View GitHub Profile
(walden-2) ~/projects/com/github/jiffy
blt> rm -rf _build/ && DEBUG=1 rebar3 pc clean, pc compile
===> Evaluating config script "rebar.config.script"
===> Consult config file "rebar.lock"
===> error function_clause
===> Plugin rebar_gdb_plugin not available. It will not be used.
===> Consult config file "/Users/blt/projects/com/github/jiffy/_build/default/plugins/pc/rebar.config"
===> Consult config file "/Users/blt/projects/com/github/jiffy/_build/default/plugins/pc/rebar.lock"
===> Fetching pc ({git,"file:///Users/blt/projects/us/troutwine/port_compiler",
{plugins,
[
rebar_gdb_plugin,
{pc, {git, "file:////Users/blt/projects/us/troutwine/port_compiler", {branch, "master"}}}
]}.
@blt
blt / main.rs
Last active August 29, 2015 14:07
fn main() {
funvsn(&mut std::io::stdio::stdin().chars());
}
// I'd like to make the function type here as generic as possible. All I really
// care about is getting a character iterator but I have two challenges:
//
// * this doesn't compile (rust 0.13.0, nightly)
// * there's a pesky std::io::IoResult in there
fn funvsn<I>(it: I) where I: Iterator<std::io::IoResult<char>> {
@blt
blt / ohlord.erl
Created September 12, 2014 22:46
lists:reverse(lists:sort([{(MemWords * erlang:system_info(wordsize)) / math:pow(1000, 2), Tables, Pid} || {Pid, Tables, MemWords} <- lists:foldl(fun({Pid, Tab, MemWords}, [{Pid, TabList, TotMemWords} | Rest]) -> [{Pid, [Tab | TabList], TotMemWords + MemWords} | Rest]; (Elem, Acc) -> [Elem | Acc] end, [], lists:sort([{ets:info(E, owner), E, ets:info(E, memory)} || E <- ets:all()]))])).
(pencil) ~
blt> wrk -t8 -c100 -d30s http://localhost:1234/
Running 30s test @ http://localhost:1234/
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    19.71ms   16.46ms 185.53ms   68.15%
    Req/Sec   699.43    217.36     2.10k    72.45%
  166305 requests in 30.00s, 27.96MB read
 Non-2xx or 3xx responses: 1
@blt
blt / book_list.md
Last active December 24, 2016 08:42
A list of my favorite books, in no particular order and with no particular applicability in mind.

A List of my Favorite Books

I've categorized the books--roughly--by Big Theme: the header to each sub-list.

The Idea of America

  • "Debate on the Constitution, Vol. I and II", various (Library of America)
  • "The Praire Traveler", Randolph B. Marcy
  • "An American Tragedy", Theodore Dreiser
  • "The Great Gatsby", F. Scott Fitzgerald
### Keybase proof
I hereby claim:
* I am blt on github.
* I am troutwine (https://keybase.io/troutwine) on keybase.
* I have a public key whose fingerprint is 2F6B F792 C076 5F00 62DC 40C8 1705 B016 9169 D9F8
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am blt on github.
* I am troutwine (https://keybase.io/troutwine) on keybase.
* I have a public key whose fingerprint is 97F0 B3BD 7E22 E6D0 132C F798 CB45 DAD8 A410 01EA
To claim this, I am signing this object:
-module(met_or_resp).
-export([whatdo/1]).
-type diagnosis() :: metabolic_acidosis |
respiratory_acidosis |
respiratory_alkalosis |
metabolic_acidosis_respiratory_alkalosis |
metabolic_acidosis_respiratory_acidosis |
respiratory_acidosis_metabolic_alkalosis |
(walden) /tmp/lazybones
blt> rebar --version
rebar 2.1.0-pre R16B02 20131011_060444 git 2.1.0-pre-46-g78fa8fc
(walden) /tmp/lazybones
blt> rebar get-deps
==> lazybones (get-deps)
Pulling libsass from {git,"git://github.com/hcatlin/libsass.git",
{tag,"v1.0.1"}}
Cloning into 'libsass'...