Skip to content

Instantly share code, notes, and snippets.

" https://github.com/tpope/vim-pathogen
execute pathogen#infect()
syntax on
filetype plugin indent on
set backupdir=/tmp
set directory=/tmp
" http://vim.wikia.com/wiki/Example_vimrc
set nocompatible
@aaitken
aaitken / gist:9149010
Last active August 29, 2015 13:56
Trying to get running with docpad-plugin-browserifydocs
===scripts/test/tester.js===
---
browserify: true
---
module.exports = function(){
console.log('I am tester!');
};
plugins:
browserifybundles:
bundles: [
{arguments: ['-r', 'src/documents/assets/scripts/test/test']}]
@aaitken
aaitken / index.html
Created October 24, 2012 18:21 — forked from ajaswa/centered.css
vertical align content
<!doctype html>
<html>
<head>
<link href="lightbox.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="lightbox">
<div class="overlay"></div>
<div class="wrapper">
<div class="inner">
require [
#data
'models/options'
'models/ui'
#thin models
'models/optionsOptions'
'models/optionsClubHead'
'models/optionsGrip'
'models/optionsShaft'
'models/optionsLengthWrap'
@aaitken
aaitken / formToJson.js
Created July 6, 2011 03:31
basic amd module for converting form inputs and values to a JSON string
define([],function(){
var formToJson=function(e){ //e = submit event
var srcObj={}, //object 2b stringified
forEach=Array.prototype.forEach; //2b used on form.elements, which is an array-like html node collection
e.preventDefault(); //prevent default form submit
forEach.call(e.target.elements,function(item){ //function's param via JS spec on forEach (which also includes two others)
srcObj[item.name]=item.value;
});
HTML================================
<div>
<input type="radio"><label><span>Short Text</span></label>
</div>
<div>
<input type="radio"><label><span>Longer Text That Should Eventually Wrap</span></label>
</div>
<div>
<input type="radio"><label><span>Longer Text That Should yes Eventually Wrap and wrap and wrap</span></label>
var BL={};//Baseline namespace
BL.Rule=function(){
this.canvas=document.createElement('canvas');
this.docWidth=document.body.offsetWidth;
this.docHeight=document.body.offsetHeight;
this.lineHeight=null;//set with init
//Declaration initializes and draws
this.init();
};
BL.Rule.prototype={