Skip to content

Instantly share code, notes, and snippets.

package main
import (
"encoding/hex"
"flag"
"io"
"io/ioutil"
"log"
"net"
"os"
javascript:(function(){var%20ps=document.getElementsByTagName("pre");for(var%20i=0;i<ps.length;i++){ps[i].style.whiteSpace="pre-wrap";ps[i].style.width="600px";}})();
@elasticdog
elasticdog / poolboy_demo.ex
Created October 23, 2015 14:20 — forked from henrik/poolboy_demo.ex
Example of using Poolboy in Elixir to limit concurrency (e.g. of HTTP requests).
defmodule HttpRequester do
use GenServer
def start_link(_) do
GenServer.start_link(__MODULE__, nil, [])
end
def fetch(server, url) do
# Don't use cast: http://blog.elixirsips.com/2014/07/16/errata-dont-use-cast-in-a-poolboy-transaction/
timeout_ms = 10_000
@elasticdog
elasticdog / git-dmz-flow.md
Created October 4, 2016 18:29 — forked from djspiewak/git-dmz-flow.md
Git DMZ Flow

Git DMZ Flow

I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.

  • Two developers working on independent features must never be blocked by each other
    • No code freeze! Ever! For any reason!
  • A developer must be able to base derivative work on another developer's work, without waiting for any third party
  • Two developers working on inter-dependent features (or even the same feature) must be able to do so without interference from (or interfering with) any other parties
  • Developers must be able to work on multiple features simultaneously, or at lea