Skip to content

Instantly share code, notes, and snippets.

View tehsquidge's full-sized avatar

Liam Kerr tehsquidge

  • People's Republic of Glasgow
View GitHub Profile
function ObjectPool(classType, growthVector, resetFunction){
this._freePool = [];
this._activePool = [];
this._classType = classType;
this._growthVector = growthVector;
this._reset = resetFunction;
}
ObjectPool.prototype = Object.create(null, {
.middle-align:before { content: ''; display: inline-block; height: 100%; width: 0; vertical-align: middle; }
.middle-align > * { vertical-align: middle; }
.justify-align { margin-bottom: -1.2em; /* line-height compensation */ text-align: justify; -moz-text-align-last: justify; -webkit-text-align-last: justify; /* not implemented yet, and will not be */ text-align-last: justify; /* IE */ }
.justify-align:after { content: ''; display: inline-block; width: 100%; }
.justify-align > * { text-align: left; }
/* adjust spacing between inline-block (we need to keep spaces to justify) */
.middle-align, .justify-align { letter-spacing: -.54em; word-spacing: -.13em; }
.middle-align > * , .justify-align > * { display: inline-block; letter-spacing: normal; word-spacing: normal; }
@tehsquidge
tehsquidge / upgrade-modx.sh
Created September 3, 2015 15:13
Upgrade MODX
#!/bin/bash
#run in parent directory of public_html
read -e -p "what is the account username? " -i `stat -c "%U" ./` NAME #get the FTP owner account
wget http://modx.com/download/latest -O modx-latest.zip
unzip modx-latest.zip -d modx-latest
cp -R modx-latest/*/* public_html/
cd public_html/setup/
@tehsquidge
tehsquidge / gist:7659044
Last active December 29, 2015 10:49
big fugging headers
(function($) {
$.bigHeader = function(element, options) {
var plugin = this;
plugin.settings = {}
var $element = $(element),
element = element;