Skip to content

Instantly share code, notes, and snippets.

View aarongodin's full-sized avatar
🏃‍♂️
encours

Aaron Godin aarongodin

🏃‍♂️
encours
View GitHub Profile
@tmilos
tmilos / README.md
Last active May 13, 2024 02:36
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation

@jcemer
jcemer / grid.styl
Created September 18, 2012 00:00
A semantic.gs working stylus file
// .-. .-. .-. .-.
// Semantic.gs // for Stylus: http://learnboost.github.com/stylus/
// .-. .-. .-. .-.
// Defaults which you can freely override
$columnwidth = 60
$gutterwidth = 20
$columns = 12
gridwidth($c = $columns)
@adamvr
adamvr / genres.txt
Created September 3, 2012 18:33
id3 genre numbers
0 - Blues
1 - Classic Rock
2 - Country
3 - Dance
4 - Disco
5 - Funk
6 - Grunge
7 - Hip-Hop
8 - Jazz
9 - Metal
@soemarko
soemarko / theme.html
Created November 26, 2011 16:18
embed github gist to tumblr
<!-- Add the following lines to theme's html code right before </head> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist">https://gist.github.com/1395926</div>
-->
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@wbailey
wbailey / databases.rake
Created February 11, 2011 08:58
ActiveRecord migrations outside of Rails
require 'yaml'
require 'logger'
require 'active_record'
namespace :db do
def create_database config
options = {:charset => 'utf8', :collation => 'utf8_unicode_ci'}
create_db = lambda do |config|
ActiveRecord::Base.establish_connection config.merge('database' => nil)