Skip to content

Instantly share code, notes, and snippets.

View moklett's full-sized avatar

Michael Klett moklett

  • Chargify.com
  • Cary, NC
View GitHub Profile
@moklett
moklett / keybase.md
Created August 18, 2014 15:06
Keybase Proof

Keybase proof

I hereby claim:

  • I am moklett on github.
  • I am moklett (https://keybase.io/moklett) on keybase.
  • I have a public key whose fingerprint is 365F 3A48 6DAA 9246 139F B2E5 3DE2 CF72 91C8 AE79

To claim this, I am signing this object:

@moklett
moklett / task1.exs
Last active May 7, 2024 09:59
Elixir Task - Crash Handling
# This demonstrates that, when using async/await, a crash in the task will crash the caller
defmodule Tasker do
def good(message) do
IO.puts message
end
def bad(message) do
IO.puts message
raise "I'm BAD!"
end
@moklett
moklett / doublesplat.rb
Last active October 4, 2017 16:18
Ruby Double Splat is a bit like Javascript Spread
a = { a: "a" }
b = { b: "b" }
{ **a, **b }
#=> {:a=>"a", :b=>"b"}
{ z: "z", **a, **b }
#=> {:z=>"z", :a=>"a", :b=>"b"}
{ a: "AAA", **a, **b }