Skip to content

Instantly share code, notes, and snippets.

Tending the weeds

Daniel Hedlund dhedlund

Tending the weeds
View GitHub Profile
View gist:6fd47ddfbf51b48a12385760cf2c8c31
### Keybase proof
I hereby claim:
* I am dhedlund on github.
* I am dhedlund ( on keybase.
* I have a public key ASA0mGPwrTLRmvwITbe3clki11kFVvs-M_j2lLVEr_N1qAo
To claim this, I am signing this object:
dhedlund / gist:9635035
Created Mar 19, 2014
Dynamic Tracing with DTrace and SystemTap
View gist:9635035

class: center, middle

Dynamic Tracing with DTrace and SystemTap


  • Originally developed by Sun Microsystems, now Oracle
dhedlund / gist:1938130
Created Feb 29, 2012
PDXErlang intersection implementation w/ Nick
View gist:1938130
intersection(ListA, ListB) ->
intersection([], ListA, ListB).
intersection(Acc, [], ListB) ->
intersection(Acc, ListA, ListB) ->
dhedlund / gist:1727909
Created Feb 3, 2012
Salt Presentation
View gist:1727909
dhedlund / gist:1561873
Created Jan 4, 2012
Palindrome Iteration
View gist:1561873

Discovered an interesting algorithm for finding longest palindrome by playing with sequences in a text editor. Anyone know if there's a name for this algorithm?

Worst running time is O(n^2), which is better than the naive implementation of O(n^3) but not as efficient as some O(n) implementations ( In general, assuming a non-pathological case, running time is around 2n * m where n is the length of the string and m is the mean length of all palindromes. For non-pathological cases (i.e. human sentences), n is often logarithmic (log n) and fast approaches 1 as n increases. This puts the average case complexity at around n log n and best-case n.

Developed as a solution to:


Original hand-work to discover a pattern:

dhedlund / PKGBUILD
Created Nov 6, 2011
coffee-script-1.1.2 PKGBUILD
# Maintainer: Simon Lipp <>
# Contributor: Chris Bolton <>
# Contributor: Sergei Lebedev <superbobry at gmail dot com>
pkgdesc='CoffeeScript is a little language that compiles into JavaScript.'
dhedlund / gist:1338058
Created Nov 3, 2011
PLUG Presentation - November 2011
View gist:1338058

Generating an SSH Key

ssh-keygen -f ~/.ssh/github
 IdentityFile ~/.ssh/github