Skip to content

Instantly share code, notes, and snippets.

View JeetKunDoug's full-sized avatar

Doug Rohrer JeetKunDoug

  • Apple, Inc.
  • Cincinnati, Ohio USA
View GitHub Profile
@JeetKunDoug
JeetKunDoug / bookmark-nc.sh
Created April 29, 2015 14:52
Stupid bookmark website via netcat script
#!/bin/bash
# extract the protocol
proto="$(echo $1 | grep :// | sed -e's,^\(.*://\).*,\1,g')"
# remove the protocol -- updated
url=$(echo $1 | sed -e s,$proto,,g)
# extract the user (if any)
user="$(echo $url | grep @ | cut -d@ -f1)"
@JeetKunDoug
JeetKunDoug / elixir_redis.ex
Created March 28, 2014 16:01
Elixir macros defining methods based on variable names
defmodule Ops.Macro do
defmacro defop(op) do
quote do
def unquote(op) do
IO.puts "you called #{op}"
end
end
end
end
### Keybase proof
I hereby claim:
* I am jeetkundoug on github.
* I am jeetkundoug (https://keybase.io/jeetkundoug) on keybase.
* I have a public key whose fingerprint is D9C7 DF81 5F8C 521F 0692 2E66 C7CC E42C 7038 5792
To claim this, I am signing this object: