Skip to content

Instantly share code, notes, and snippets.

View aubricus's full-sized avatar
Coffee.

Aubrey Taylor aubricus

Coffee.
View GitHub Profile
@aubricus
aubricus / swipe.js
Last active December 23, 2015 11:49
Swipe Detection
SwipeEvent = {
'START' : 'start',
'DRAG' : 'drag',
'COMPLETE': 'complete',
'FAIL' : 'fail'
};
/**
* @namespace Swipe
* @description Simple interface to detect a touch based "Swipe"
@aubricus
aubricus / loader-gist.py
Created September 9, 2013 07:01
Python plugin loader.
def load_plugin(target, invoke_on_load=True, invoke_args=(),
invoke_kwargs={}):
if ':' in target:
module_name, attr_name = target.rsplit(':', 1)
else:
module_name, attr_name = target.rsplit('.', 1)
try:
module = import_module(module_name)
cd /usr/local
sudo chown -R `whoami`:admin ./
git reset --hard
git clean -fd
cd ~
brew update
@aubricus
aubricus / gist:6144061
Created August 2, 2013 22:44
IE VM Automation
https://github.com/xdissent/ievms
Quick Installation:
1. Install VirtualBox (make sure command line utilities are selected and installed).
2. Download and unpack ievms:
- Install IE versions 6, 7, 8, 9 and 10.
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash
@aubricus
aubricus / RouteObjectInsanity.md
Last active December 20, 2015 09:39
Zend routes vary in appearance

Zend Route Object Insanity

Zend route objects seem to vary in appearance given certain conditions.

Notes:

  • Route object obtained from ControllerInstance->params()->fromRoute()
  • Other Zend objects returning either a route or an array with a route seem to suffer the same problem.
  • This could be a route configuration problem, but logging here for reference.
  • Below I've cataloged what I've found so far.
@aubricus
aubricus / scrollable.js
Created July 15, 2013 19:29
Check for scrollable element using jQuery.
/**
* Test to get correct scrollable element
* @return {string}
* @see http://www.zachstronaut.com/posts/2009/01/18/jquery-smooth-scroll-bugs.html (updated to use $.scrollTop())
* @requires jquery 1.7+
*/
getScrollable = function(){
var result = 'html, body',
initScrollTop;
@aubricus
aubricus / core.test.js
Created February 16, 2013 05:29 — forked from drewwells/core.test.js
QUnit with Requirejs integration.
//Wait for relevant code bits to load before starting any tests
define(['core.js'], function( core ) {
module("Core Tests");
test("Test core methods", function(){
expect(2);
equals( 1, 1, "A trivial test");
ok( true, "Another trivial test");
});
@aubricus
aubricus / tasks.py
Created February 14, 2013 00:35
print message utility function for fabric tasks
from utils import print_message
@task
def foo():
print_message('foo executed', 'green')
@aubricus
aubricus / vagrant-ssh.bat
Last active December 12, 2015 03:58
Windows, Vagrant ssh snippet
:: Windows / Vagrant ssh snippet
:: Gotcha: Calling "ssh" from the windows CMD.exe requires Cygwin installed and
:: added to the PATH. This allows me to use the ssh port, but does not
:: require that I run this batch through Cygwin.
:: Notes:
:: The Vagrant convenience "vagrant ssh" doesn't work on windows.
:: One is left to manually ssh into the virtual box, which can be cumbersome.
@aubricus
aubricus / perfect-pixel-custom-style.css
Last active December 4, 2015 00:11 — forked from anonymous/perfect-pixel-custom-style.css
Custom styles for PerfectPixel Chrome Extension
#chromeperfectpixel-panel button {
padding: 0.7em;
border-radius: 0 !important;
background: #dedede !important;
}
#chromeperfectpixel-panel #chromeperfectpixel-panel-header {
height: 33px !important;
background: #dedede !important;
}