Skip to content

Instantly share code, notes, and snippets.

View thraxil's full-sized avatar

Anders Pearson thraxil

View GitHub Profile
@thraxil
thraxil / .muttrc
Created February 20, 2014 15:48
mutt config for Columbia Lionmail
set from = "YOURUNI@columbia.edu"
set realname = "YOUR NAME"
set imap_user = "YOURUNI@columbia.edu"
set imap_pass = "YOURDEVICEPASSWORD"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed ="+[Google Mail]/Drafts"
set trash = "+[Google Mail]/Trash"
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
@thraxil
thraxil / agner.erl
Last active December 27, 2015 06:29
-module(agner).
-export([erlangA/2, erlangB/2, erlangC/2]).
erlangA(Lambda, H) ->
Lambda * H.
erlangB(_, 0) ->
1;
erlangB(E, M) ->
N = E * erlangB(E, M - 1),
@thraxil
thraxil / gist:7282064
Last active December 27, 2015 06:29
Erlang-C
erlangC(_, 0) ->
1;
erlangC(E, M) ->
B = erlangB(E, M),
(M * B) / (M - (E * (1 - B))).
@thraxil
thraxil / gist:7282047
Last active December 27, 2015 06:29
Erlang-B
erlangB(_, 0) ->
1;
erlangB(E, M) ->
N = E * erlangB(E, M - 1),
N / (N + M).
@thraxil
thraxil / gist:7282027
Last active December 27, 2015 06:29
erlang-A
erlangA(Lambda, H) ->
Lambda * H.
@thraxil
thraxil / gist:6067562
Created July 24, 2013 01:54
hekad config for a simple statsd replacement
[StatsdInput]
address = ":8125"
[StatAccumInput]
ticker_interval = 10
emit_in_payload = true
[CarbonOutput]
message_matcher = "Type == 'heka.statmetric'"
address = "graphite.example.com:2003"
@thraxil
thraxil / gist:6067558
Last active December 20, 2015 03:59
hekad config to echo input file to output file
[LogfileInput]
logfile = "/tmp/input"
seekjournal = "/tmp/hekaseekjournal"
[FileOutput]
message_matcher = "Type =~ /.*/"
path = "/tmp/output"
@thraxil
thraxil / gist:5940704
Created July 6, 2013 18:05
But this is not valid Python:
i = 3
print "i is: " + i
# you get: TypeError: cannot concatenate 'str' and 'int' objects
@thraxil
thraxil / gist:5940700
Created July 6, 2013 18:04
This is valid Java
public class Foo {
public static void main(String[] args) {
Integer i = 3;
System.out.println("i is: " + i);
}
}
@thraxil
thraxil / gist:5404231
Last active December 16, 2015 08:09
How to add a gittip button to your github project.

Very simple. Just create a README.md or README.markdown for your project (if you haven't already) and add code like the following:

[![Fund me on Gittip](https://www.gittip.com/assets/7.0.8/logo.png)](https://www.gittip.com/<your account here>/)

Gittip needs a proper button for linking. The small logo file was the best I could find. It will look something like this:

Fund me on Gittip