Skip to content

Instantly share code, notes, and snippets.

matthewfranglen / Git Reverse
Last active Dec 2, 2015
Reverse time with this script!
View Git Reverse
function main () {
local original_hash=$(get_current_commit_hash)
go_to_project_root || exit 1
create_new_branch || exit 1
commit_with_copied_metadata ${original_hash} || exit 1
for commit_hash in $(list_commit_hashes ${original_hash} | delete_last_line)
matthewfranglen / gist:a41b7b1248e3dabd41d8
Created May 13, 2015
Remove from slack links
View gist:a41b7b1248e3dabd41d8
matthewfranglen / gist:b840e509ab6f60114e86
Created Apr 17, 2015
Why Vim is the best text editor
View gist:b840e509ab6f60114e86
The core idea of Vim is the very essence of the Unix Philosophy:
> Even though the UNIX system introduces a number of innovative programs and
> techniques, no single program or idea makes it work well. Instead, what makes
> it effective is the approach to programming, a philosophy of using the
> computer. Although that philosophy can't be written down in a single sentence,
> at its heart is the idea that the power of a system comes more from the
> relationships among programs than from the programs themselves. Many UNIX
> programs do quite trivial things in isolation, but, combined with other
> programs, become general and useful tools.
matthewfranglen / gist:64e417598355f811d900
Created Jan 15, 2015
Example use of Trie to find substring matches
View gist:64e417598355f811d900
#!/usr/bin/env python
# pylint: disable=C0111, R0903
class Trie(object):
def __init__(self):
self.children = {}
def add_child(self, letter):
if letter in self.children:
View gist:5a743f956c05978916c1
$('img').each(function (i, e) { $(e).attr("src", $(e).attr("data-src")); });