This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* File: bst.js | |
* | |
* A pure JavaScript implementation of a binary search tree. | |
* | |
*/ | |
/* | |
* Class: BST | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.braindead.beep = new Audio("data:audio/wav;base64,UklGRpCaBgBXQVZFZm10IBAAAAABAAIARKwAABCxAgAEABAAZGF0YWyaBgDv/+3/5f/s/9j/6//S/+//xP/s/7v/8f+q/+7/pf/p/5z/4v+f/9L/of/P/6L/wP+m/8H/nv+4/6T/t/+j/7L/qP+v/63/rv+q/6v/p/+s/6P/qf+e/6f/pP+n/6r/q/+v/7D/tv+0/7v/t/+4/7n/uf+3/7P/wP+0/7r/pv+9/6T/sf+N/6v/hv+f/3b/nP93/5j/c/+Y/2z/k/9h/5H/Tf+L/0H/iv83/4b/Mv+E/zL/ef8s/3H/Jv9m/yf/YP8j/2P/L/9k/y//af87/2j/Qf9n/1P/bf9m/3L/ff94/4z/gP+a/4L/pv+I/7r/i//J/5f/4/+c/+r/qv/7/7D//P+5/wYAxv8RAM7/GADg/yIA5v8dAO7/FQD5/xAAAAADAA8ABwAYAAQAIQAKACYADAAlABMAJQAcACgAKQAtADoAOQBJAEAAWgBLAGgAUwB1AFcAfQBkAIQAZwCJAG8AkwB4AJYAdwClAIMApQCMAK0AkgCtAKIArgCdALoAowC2AJoAwQCZAL0AkwC6AJMAtACRAKgAjwClAJEAmQCQAJ0AkQCSAJUAkgCPAIgAkACGAI0AdQCFAHcAggBrAHMAbgByAHAAZgBvAGsAdgBgAHEAagB3AGUAcgBpAHIAawBwAGkAcgBwAHYAagCBAHcAhgBrAI8AcgCNAGsAkQBrAIkAbwCJAG8AgQByAH4AcwB1AHMAcwBzAG4AdgByAHsAdwB9AHUAhwB1AIYAbgCPAHIAjQBwAJcAdwCXAHYAlwBzAJIAbACMAGcAhQBgAIEAYQCCAGEAgwBgAH8AXwB8AFgAdABPAHAASQBsAD4AZAA9AF4AOQBYADUAUAAuAEYAJQA+AB4ALQAXACEAEQATAAcAAwD1//v/5P/v/9D/6//G/+T/uv/k/7n |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.braindead.beep = new Audio("data:audio/wav;base64,UklGRpBCDgBXQVZFZm10IBAAAAABAAIARKwAABCxAgAEABAAZGF0YWxCDgD9/wwAAQAVAAUAHwALACMAEgAlABIAJQAVACUADwAwABAAOQASAEgAGQBJAB0AUQApAEwAJABUACYAUgAkAFYAJgBUAC0AUgAxAEwAMABHACoARAAiAEUAHABDAB8APwAeAD8AKAA2ACUAOAAuADEALgA1ADcANAA9AD0ASwA9AE0ARgBSAD4AWQBEAFQAOQBfADsAXgA7AGMAOQBkAEEAZQA5AGQAPQBpADcAaAA3AG8ANABrAC8AZQAzAFgAKgBJADIAPwApADIAKgAuACYAJAAjACEAHwAaABkAEQAXABAAEQAGAA4AAwAFAPf/AgD1//b/7P/0//T/5v/u/+f/8v/b//L/2//t/9X/7//P/+z/zv/s/8b/7v/D//H/wv/u/73/8//B/+r/v//r/8n/5v/G/+j/0//o/83/7P/S//D/xf/y/8z//P/H/wEA0f8JANT/CwDd/wgA2v8KAOT/DADi/xoA7v8lAPf/NgD7/z4ACABCAAoATQASAE8AIQBhACgAZAA1AHIAPwB2AEQAfgBPAIIAUQB9AFoAfABfAHEAXgB2AGkAdQBkAHgAawBzAGYAbABkAGUAZgBhAGMAZgBrAGwAawB2AG8AewBpAH0AZwCAAGQAfwBhAIIAagB/AGsAgQB1AH4AcwCDAHoAfgB4AIQAgACFAHsAiACCAJIAeACOAIEAkwB+AIwAiQCSAIkAkwCSAKIAlgCqAJwAsQCiALIAqQCyAKgAsACtAKwArACvAKsArgCzALUAsQC3AL0AtAC3AK0AtQCmAKwAmQCiAJ4AoQCYAKEApgCgAKYAoACnAJ0AogCYAJgAmQCTAJQAlACZAJYAkgCVAI8AlwCGAI0AhACQAIEAiQCHAIwAiACKAIcAigCIAIQAfgB9AHwAdAB5AG4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2017 Trevor Menagh | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function nestedCallbacks(callback) { | |
console.log("start"); | |
firstNest(function () { | |
secondNest(function () { | |
callback("test"); | |
}); | |
}); | |
} | |
function firstNest(callback) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" :RL <regexp> will now remove all matched lines in a file | |
function! RemoveLine(regexp) | |
exe '%s,^.*' . a:regexp . '.*$\n,,g' | |
endfunction | |
command! -nargs=1 RL call RemoveLine(<f-args>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
words = File.readlines("/usr/share/dict/words").map(&:chomp).map(&:downcase) | |
words.reject! { |word| word.length > 7 } | |
line = ('a'..'z').to_a.sample(7) | |
puts line.join(", ") | |
perm = (1..7).inject([]) { |acc, n| | |
acc + line.permutation(n).to_a | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
### | |
# cd override | |
# | |
# This replaces the builtin cd command | |
### | |
function init_local_env() { | |
SAVED_VAR=ENV$(echo $1 | sed -e s:/:_:g | tr "[:lower:]" "[:upper:]")_SAVED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_links": { | |
"self": { "href": "/" }, | |
"curies": [{ | |
"name": "ex", | |
"href": "http://www.example.com/rels/{rel}", | |
"templated": true | |
}, | |
{ | |
"name": "ot", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Colors | |
# | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
NORMAL="\[\033[0m\]" | |
# | |
# Prompt Setup |
NewerOlder