Skip to content

Instantly share code, notes, and snippets.

View benjamine's full-sized avatar

Benjamín Eidelman benjamine

View GitHub Profile
@benjamine
benjamine / trie.js
Created December 19, 2018 22:37 — forked from alexandervasyuk/trie.js
Trie
function Trie() {
this.head = {
key : ''
, children: {}
}
}
Trie.prototype.add = function(key) {
var curNode = this.head
@benjamine
benjamine / README.mdown
Created May 30, 2011 16:04 — forked from mathewbyrne/README.mdown
An asynchronous method for embedding gists in an HTML document using jQuery.

A quick jQuery plugin for asynchronously embedding a gist in an HTML document.

There are a couple of ways to use it. The simpler way is replacing all Gist links in document by their embedded version:

<script>$($.gist);</script>

All links that point to a gist, or gist file will be replaced by the corresponding embedded gist, or gist file.

Gist link replacement can also be called on a container element: