Skip to content

Instantly share code, notes, and snippets.

@bryanhunter
bryanhunter / Default (Windows).sublime-keymap.json
Created September 22, 2013 16:21
Sublime Text key mappings
[
{ "keys": ["ctrl+shift+s"], "command": "save_all" },
{ "keys": ["ctrl+alt+s"],
"command": "run_existing_window_command", "args":
{
"id": "repl_shell",
"file": "config/Shell/Main.sublime-menu"
}
},
@bryanhunter
bryanhunter / Preferences.sublime-settings.json
Created September 22, 2013 16:19
Sublime Text user settings
{
"bold_folder_labels": true,
"caret_style": "smooth",
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"draw_minimap_border": false,
"fade_fold_buttons": false,
"font_face": "Inconsolata",
"font_size": 15,
"gutter": true,
"highlight_line": true,
@bryanhunter
bryanhunter / erlang-camp-call-20130826.md
Last active December 22, 2015 00:39
Erlang Camp Nashville!

Erlang Camp will come to Nashville on Friday, October 11-12. Thanks to a partnership with VINES, Erlang Camp will be held in a comfy, perfect-for-labs classroom at Vanderbilt University.

This is your single best opportunity to level-up on Erlang. I attended Erlang Camp Chicago in 2010 and the format is very effective and fun. Five or ten minutes of slides and instruction and then ten minutes of coding what you just learned. Repeat, repeat, repeat all-day-long, and day-two is just as active and good. Simply amazing.

Also, if you're interested in Elixir, most everything you learn at Erlang Camp will be applicable. Erlang Camp has a heavy focus on OTP and properties of the Erlang VM. It is led by Martin Logan, Eric Merritt, and Jordan Wilberding. Martin and Eric authored OTP in Action.

Buy your tickets here: https://erlangcampnashville2013.eventbrite.com/

The $125 early-bird tickets are av

@bryanhunter
bryanhunter / MonokaiSW.md
Last active October 15, 2021 08:12
Mapping colors of the Monokai color scheme to their nearest Sherwin-Williams paint color
@bryanhunter
bryanhunter / build-erlang-r16b01.sh
Last active December 20, 2015 15:09
Build Erlang R16B01 on Ubuntu
#!/bin/bash
# Pull this file down, make it executable and run it with sudo
# wget https://raw.github.com/gist/6152521/build-erlang-r16b01.sh
# chmod u+x build-erlang-r16b01.sh
# sudo ./build-erlang-r16b01.sh
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
@bryanhunter
bryanhunter / 2013-06-24.Congress.txt
Created June 24, 2013 16:48
Letter to Congress about Edward Snowden's NSA revelations and the PATRIOT Act
Dear Congressman:
The NSA programs and activities recently disclosed by the whistleblower Edward Snowden are in clear violation of the Fourth Amendment. Despite the fear and mad scramble for security, our constitution was not amended by 9/11, by Osama bin Laden, or by the PATRIOT Act. The Constitution is still the supreme law, and each federal official has sworn to uphold the Constitution including the Fourth Amendment.
If we are in fear of terrorism, the terrorist win. If we allow terrorists to diminish our liberties or to alter our way of life, the terrorists win. I personally have no fear of terrorists. Statistically cars and fatty foods are scary, but terrorists are not. I am, however, afraid of the fear-mongers in Congress. I am afraid they are horse-trading our liberty for our security. I am afraid they are creating a nation of cowards. I am afraid America is becoming precisely what it long struggled against during the Cold War.
The PATRIOT Act has been steadily rotting the foundations of our Republi
@bryanhunter
bryanhunter / cqrs-with-erlang-abstract.md
Last active December 17, 2015 11:59
"CQRS with Erlang" abstract for the Strange Loop (2013)

CQRS with Erlang

Erlang an industry-proven functional programming language that simplifies writing reliable, concurrent, distributed systems.

CQRS is an architectural pattern that separates commands (which mutate state) from queries (which return values). With CQRS the “read” data store and the “write” data store can be on different severs, can use different storage engines, and can be scaled independently. CQRS is often linked with the Event Sourcing pattern which models state as a series of events (past tense verbs) rather than a single “latest” value. What works for an accountant’s ledger and for Git can work for our “write” store too. Given a series of events we can deal with concurrency and collisions more intelligently than “last guy wins”. We can also define varied service level agreements for commands and queries.

CQRS promotes distribution, concurrency and eventual consistency which is dandy until we attempt to code an implementation with conventional tools like C# or Java. Lucky for us Erlang i

@bryanhunter
bryanhunter / build-erlang-r16b.sh
Created April 30, 2013 09:26
Build Erlang R16B on Ubuntu
#!/bin/bash
# Pull this file down, make it executable and run it with sudo
# wget https://raw.github.com/gist/5487621/build-erlang-r16b.sh
# chmod u+x build-erlang-r16b.sh
# sudo ./build-erlang-r16b.sh
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi
@bryanhunter
bryanhunter / DumpToExcel.cs
Created January 25, 2013 16:19
Painless way to build Microsoft Excel spreadsheets from any IEnumerable<T>. Does not require Excel.
using System.Collections.Generic;
using System.IO;
using OfficeOpenXml; // (EPPLus - http://epplus.codeplex.com/)
namespace OfficeReports
{
public static class DumpToExcel
{
public static void Dump<T>(IEnumerable<T> data, string outputFilename)
{
@bryanhunter
bryanhunter / r15b03-on-raspbian1212.sh
Last active May 20, 2017 11:29
Builds Erlang R15B03 from source on the Raspberry Pi. Tested on the 2012-12-16 build of Raspbian (Wheezy)
#!/bin/bash
# Pull this file dowm, make it executable and run it with sudo
# wget https://gist.github.com/raw/4361444/r15b03-on-raspbian1212.sh
# chmod u+x r15b03-on-raspbian1212.sh
# sudo ./r15b03-on-raspbian1212.sh
if [ $(id -u) != "0" ]; then
echo "You must be the superuser to run this script" >&2
exit 1
fi