Skip to content

Instantly share code, notes, and snippets.

@mirlord
mirlord / mapping.js
Created December 11, 2012 15:40
tpl3d.js proof of concept
var flatObj = {
simple_str: 'simple',
stringified_array: 'simple,array',
'a.1': 'item first',
'a.0': 'item second'
'obj.field': '1.0'
};
var treeTemplate = {
unstringified: [
String joinParts(String... nameParts) { /* ... */ }
void m() {
joinParts("1", new String[] {"2", "3"}); // illegal. WAAAAYYYYY????
}
@mirlord
mirlord / gist:2595068
Created May 4, 2012 14:20
yield_content/content_for incorrect output
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<link href="/stylesheets/site.css" media="screen" rel="stylesheet" type="text/css" />
0
</head>
@mirlord
mirlord / git-fci.sh
Created August 1, 2010 19:24
git "fast commit" without any meaningful comment (with fortune string instead)
if [ $(which fortune) ]; then
_msg=$(fortune -s -n 78)
else
cat >&2 << EOM
You have no fortune installed on your system,
the default commit message will be used.
EOM
_msg="T[w]o be[er] or not t[w]o be[er]"
fi
git commit -a -m "${_msg}"
set noundofile
"set undodir=~/.vim/undo/
au BufReadPost * silent! execute "rundo" . $HOME . "/.vim/undo" . expand("%:p")
au BufWritePost * silent! call mkdir($HOME . "/.vim/undo" . expand("%:p:h"), "p", 0755)
au BufWritePost * execute "wundo" . $HOME . "/.vim/undo" . expand("%:p")