Skip to content

Instantly share code, notes, and snippets.

View SlexAxton's full-sized avatar

Alex Sexton SlexAxton

View GitHub Profile
@SlexAxton
SlexAxton / prose.zsh-theme
Created February 23, 2012 08:18
my prose file
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}
function hg_prompt_info {
hg prompt --angle-brackets "\
< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
@SlexAxton
SlexAxton / Nonminified.js
Created February 8, 2012 22:56 — forked from anonymous/modernizr-2.5.2.min.js
Modernizr 2.5.2 that crashes IE7/8
/* Modernizr 2.5.2 (Custom Build) | MIT & BSD
* Build: http://www.modernizr.com/download/#-shiv
*/
;
window.Modernizr = (function( window, document, undefined ) {
var version = '2.5.2',
@SlexAxton
SlexAxton / srsly.js
Created February 8, 2012 01:32
seriously for real this time
/* Modernizr 2.5.1 (Custom Build) | MIT & BSD
* Build: http://www.modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bin
@SlexAxton
SlexAxton / sexy.js
Created February 8, 2012 01:24
modnope 2|1.5.2
/* Modernizr 2.5.1 (Custom Build) | MIT & BSD
* Build: http://www.modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function C(a){j.cssText=a}function D(a,b){return C(n.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a)if(j[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d
/*yepnope1.5.2|WTFPL*/
// yepnope.js
// Version - 1.5.2
//
// by
// Alex Sexton - @SlexAxton - AlexSexton[at]gmail.com
// Ralph Holzmann - @ralphholzmann - ralphholzmann[at]gmail.com
//
// http://yepnopejs.com/
// https://github.com/SlexAxton/yepnope.js/
@SlexAxton
SlexAxton / brokenope.js
Created February 7, 2012 20:42
Closure compiled advanced yepnope
(function(k,h,L){function r(a){return w.call(a)=="[object Function]"}function s(a){return typeof a=="string"}function t(){}function A(a){return!a||a=="loaded"||a=="complete"||a=="uninitialized"}function m(){var a=u.shift();v=1;a?a.d?o(function(){(a.d=="c"?i.t:i.u)(a.j,0,a.e,a.x,a.f,1)},0):(a(),m()):v=0}function M(a,b,x,f,l,g,e){function p(c){if(!B&&A(d.readyState)&&(C.z=B=1,!v&&m(),d.onload=d.onreadystatechange=null,c)){a!="img"&&o(function(){D.removeChild(d)},50);for(var p in j[b])if(j[b].hasOwnProperty(p))j[b][p].onload()}}
var e=e||i.a,d={},B=0,y=0,C={d:x,j:b,f:l,e:g,x:e};j[b]===1&&(y=1,j[b]=[],d=h.createElement(a));a=="object"?d.data=b:(d.src=b,d.type=a);d.width=d.height="0";d.onerror=d.onload=d.onreadystatechange=function(){p.call(this,y)};u.splice(f,0,C);a!="img"&&(y||j[b]===2?(D.insertBefore(d,E?null:n),o(p,e)):j[b].push(d))}function N(a,b,x,f,h){v=0;b=b||"j";s(a)?M(b=="c"?O:F,a,b,this.b++,x,f,h):(u.splice(this.b++,0,a),u.length==1&&m());return this}function G(){var a=i;a.h={load:N,b:0};return a}var q=
@SlexAxton
SlexAxton / modernizr.h5bp.custom.js
Created February 6, 2012 05:57
h5bp cut mod+yepnope build Mod 2.5.1 with Yepnope 1.5.1
/* Modernizr 2.5.1 (Custom Build) | MIT & BSD
* Build: http://www.modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load
*/
;window.Modernizr=function(a,b,c){function C(a){i.cssText=a}function D(a,b){return C(m.join(a+";")+(b||""))}function E(a,b){return typeof a===b}function F(a,b){return!!~(""+a).indexOf(b)}function G(a,b){for(var d in a)if(i[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function H(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:E(f,"function")?f.bind(d||b):f}r
@SlexAxton
SlexAxton / File.js
Created January 7, 2012 21:48
JavaScript Code Improver output
(function()
{
function getScriptUrl(re)
{
var scripts = document.getElementsByTagName('script'),
element,
src;
for (var i = 0; i < scripts.length; i++)
{
element = scripts[i];
@SlexAxton
SlexAxton / jConstruct.js
Created December 22, 2011 20:20
jQuery constructor recreation attempt
(function (window, undefined) {
var MRTN = (function() {
// The main FeedTheWebDev function
var MRTN = function(element) {
return new MRTN.fn.init(element, rootDoc);
},
// Ref to root document
rootDoc;
@SlexAxton
SlexAxton / 01-tmpl.js
Created November 3, 2011 04:12
Handlebars require.js integration
/**
* @license handlebars tmpl 0.1.0 - Alex Sexton, but Handlebars has it's own licensing junk
*
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/require-cs for details on the plugin this was based off of
*/
/* Yes, deliciously evil. */
/*jslint evil: true, strict: false, plusplus: false, regexp: false */
/*global require: false, XMLHttpRequest: false, ActiveXObject: false,