Skip to content

Instantly share code, notes, and snippets.

Martin Schürrer MSch

Block or report user

Report or block MSch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View exrm_plugin.ex
defmodule ReleaseManager.Plugin.ReleaseTasks do
@name "release_tasks"
@shortdoc "Generates an escript to invoke PS.ReleaseTasks"
use ReleaseManager.Plugin
alias ReleaseManager.Utils
def before_release(_), do: nil
def after_release(%Config{name: name}) do

MORPHEUS: For the longest time, I wouldn't believe it. But then I saw the fields with my own eyes, watched them liquefy the dead so they could be fed intravenously to the living -

NEO (politely): Excuse me, please.


NEO: I've kept quiet for as long as I could, but I feel a certain need to speak up at this point. The human body is the most inefficient source of energy you could possibly imagine. The efficiency of a power plant at converting thermal energy into electricity decreases as you run the turbines at lower temperatures. If you had any sort of food humans could eat, it would be more efficient to burn it in a furnace than feed it to humans. And now you're telling me that their food is the bodies of the dead, fed to the living? Haven't you ever heard of the laws of thermodynamics?

MORPHEUS: Where did you hear about the laws of thermodynamics, Neo?

View dup_bench.exs
Benchfella.start duration: 1.0#, format: :machine
defmodule StringDuplicateBench do
use Benchfella
@iterations [100, 1000, 10000, 100000]
Enum.each(@iterations, fn n ->
@str "1234567890"
@n n
View stem.ex
defmodule Stemmer do
def stem(word) do
IO.puts "stemming #{word}"
case^(.+?)(ASD|QWE)$/u, word) do
[pattern_matching, like, "ASD"] -> IO.inspect like
[pattern_matching, like, "QWE"] -> IO.puts "whatever"
View 1_gen_server.ex
defmodule Mix.TasksServer do
@moduledoc false
use GenServer.Behaviour
def start_link() do
:gen_server.start_link({ :local, __MODULE__ }, __MODULE__, :ok, [])
def clear_tasks() do
call :clear_tasks

Keybase proof

I hereby claim:

  • I am msch on github.
  • I am msch ( on keybase.
  • I have a public key whose fingerprint is 6A3B C7D2 D3B2 D5CE 4C46 F279 E851 70D1 DB52 D668

To claim this, I am signing this object:

View thread.rb
module ActiveRecord
class Connection
def connect
Thread.current.thread_variable_set(:connection_id, 123)
module Sequel
class Connection
View azet.rb
$state = 0
def lol(x, y)
$state += 1
puts "Incrementing state it's now #{$state}"
[:bla, $state]
a, e = lol(:screw, :this) until e == 3
puts "a=#{a} e=#{e}"
View azet.rb
$state = 0
def lol(x, y)
$state += 1
puts "Incrementing state it's now #{$state}"
[:bla, $state]
a, e = lol(:screw, :this) until e == 3
puts "a=#{a} e=#{e}"
View brew --config
% brew --config :(
HEAD: ba09af5da322ce5506be593629a20835702c5d26
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.8.4-x86_64
Xcode: 5.0 => /Applications/
You can’t perform that action at this time.