Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am klittle32 on github.
  • I am kylelittle (https://keybase.io/kylelittle) on keybase.
  • I have a public key ASAZ14ViBGIpZVdN9D7UwSLvwPt84gbzqc3VE9iZFFnO1Ao

To claim this, I am signing this object:

@klittle32
klittle32 / gist:6ec1a2967d5180e270d6
Created June 3, 2015 01:47
Symlink to launch Sublime Text 2 from command line
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin
@klittle32
klittle32 / stemmer.js
Created February 18, 2014 14:08
Porter Stemmer in js
// Porter stemmer in Javascript. Few comments, but it's easy to follow against the rules in the original
// paper, in
//
// Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
// no. 3, pp 130-137,
//
// see also http://www.tartarus.org/~martin/PorterStemmer
// Release 1 be 'andargor', Jul 2004
// Release 2 (substantially revised) by Christopher McKenzie, Aug 2009
@klittle32
klittle32 / _jquery.menu-aim.js
Created November 13, 2013 16:06
jquery menu aim with support for deactivate menu on mouse exit menu (not just row, like the built-in option)
/**
* menu-aim is a jQuery plugin for dropdown menus that can differentiate
* between a user trying hover over a dropdown item vs trying to navigate into
* a submenu's contents.
*
* menu-aim assumes that you have are using a menu with submenus that expand
* to the menu's right. It will fire events when the user's mouse enters a new
* dropdown item *and* when that item is being intentionally hovered over.
*
* __________________________
@klittle32
klittle32 / iNet Page Type
Created October 23, 2013 14:28
Detect iNet page type via javascript
//Script to detect page type on Epicor iNet sites 2.5.3 and higher
//Version 1.0, 8/29/2013
// For dynamic urls, use parameters and values in url string
// Create getQueryVariable function to access values in query string
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
@klittle32
klittle32 / Respond.js with match media & addListener
Last active December 25, 2015 16:49
The ultimate repond.js script w/ match media and addListener polyfills
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
// Paul Irish's match media: https://github.com/paulirish/matchMedia.js/blob/master/matchMedia.js
window.matchMedia || (window.matchMedia = function() {
"use strict";
// For browsers that support matchMedium api such as IE 9 and webkit