Skip to content

Instantly share code, notes, and snippets.

View dylanmcdiarmid's full-sized avatar

Dylan McDiarmid dylanmcdiarmid

  • Durham, North Carolina
View GitHub Profile
@dylanmcdiarmid
dylanmcdiarmid / sexp-cheat-sheet
Created February 9, 2015 16:18
vim sexp mappings for normal people cheat sheet
.vimrc
" Map leader to comma
let maplocalleader=","
" Toggle this for vim-sexp to not go into insert mode after wrapping something
let g:sexp_insert_after_wrap = 0
" Toggle this to disable automatically creating closing brackets and quotes
let g:sexp_enable_insert_mode_mappings = 1
Vocab
@dylanmcdiarmid
dylanmcdiarmid / index.js
Created October 30, 2014 16:48
Mercury bug with vtree/vdom 0.0.21
// This code demonstrates a bug in mercury using vdom/vtree version 0.0.21
// After the page loads, open your dev console, and run showRed(). You can
// examine the datasets given to the boxes using getRedData or getGreenData.
// After running showRed() and letting it render, run hideRed()
//
// You can click the green box at this point, and see that it logs
// "I'm a red box" to the console, having been assigned the red boxes
// event when the red box was removed.
var h = require('mercury').h
@dylanmcdiarmid
dylanmcdiarmid / iced.js
Created November 19, 2013 15:16
Iced Coffee Script client side usage. This sets `iced` up as a global so your await/defer statements can work in the browser. I ripped this from the server side code, so it may not be entirely correct, but I do have it running and working in production.
window.iced = {
Deferrals: (function() {
__slice = [].slice
function _Class(_arg) {
this.continuation = _arg;
this.count = 1;
this.ret = null;
}