Skip to content

Instantly share code, notes, and snippets.

http://www.infoq.com/presentations/Simple-Made-Easy
http://www.infoq.com/presentations/integration-tests-scam
http://blog.thecodewhisperer.com/2010/09/14/when-is-it-safe-to-introduce-test-doubles
http://youtu.be/yTkzNHF6rMs
http://pyvideo.org/video/1670/boundaries
http://skillsmatter.com/podcast/ajax-ria/enumerators
http://alistair.cockburn.us/Hexagonal+architecture
http://c2.com/cgi/wiki?PortsAndAdaptersArchitecture
http://www.confreaks.com/videos/977-goruco2012-hexagonal-rails
http://www.confreaks.com/videos/1255-rockymtnruby2012-to-mock-or-not-to-mock
@alexmoore
alexmoore / 0. Riak on Raspberry Pi's
Last active November 18, 2021 09:39
Building Basho Erlang / Riak TS on a Raspberry Pi 3
This is unsupported by Basho, but you can build Basho's flavor of Erlang and Riak on Raspberry Pis.
function list_erlangs() {
read -ra AvailableErls <<< `ls -l $ERL_HOME | awk '/^d/' | cut -d ' ' -f12-`
Current=`ls -l $ERL_HOME | awk '/^l/' | sed 's/^l.*-> \(.*\)/\1/'`
for i in "${AvailableErls[@]}"; do
if [ $i = $Current ]; then echo "$Current *"; else echo $i; fi
done
}
function change_current_erlang() {
Target=$1
@alexmoore
alexmoore / service-checklist.md
Created September 27, 2016 20:17 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
Just Open a Socket - https://www.youtube.com/watch?v=jytJXjI0oQU

#Oh the Schemas you can Scheme!

You can scheme about scaling
Of which SQL can only dream!
You can scheme about NoSQL
Oh the schemas you can scheme

Oh, the schemes you can scheme up
if only you try!
If you try, you can scheme up

using System;
using System.Numerics;
using System.Globalization;
using System.Text;
using System.Diagnostics;
using System.Threading;
namespace StringPaddingTest
{
function doubleInteger(i) {
return i*2;
}
function isNumberEven(i) {
return i%2 === 0;
}
function getFileExtension(i) {
if(i.indexOf('.') >= 0) {
@alexmoore
alexmoore / .emacs
Created September 30, 2013 16:25
Add this to your .emacs file to autoload the tools for the current erlang with https://github.com/alexmoore/erls
;; setup erlang mode
(setq erlang-root-dir "/Users/alex/erlangs/current")
(setq erlang-lib-dir (concat erlang-root-dir "/lib/erlang/lib"))
(setq load-path
(cons (concat erlang-lib-dir
"/"
(car (directory-files erlang-lib-dir nil "^tools\-"))
"/emacs" )
load-path))
-module(fizzbuzz).
-export([print_fizz_buzz/0,fizzbuzz/1]).
print_fizz_buzz() ->
Each = fun(I) ->
print_fizz_buzz(fizzbuzz(I)) end,
lists:foreach(Each, lists:seq(1,100)).
print_fizz_buzz(I) when is_integer(I) -> io:fwrite("~p~n", [I]);
print_fizz_buzz(I) -> io:fwrite("~s~n", [I]).