Skip to content

Instantly share code, notes, and snippets.

View corydorning's full-sized avatar

Cory Dorning corydorning

View GitHub Profile
anonymous
anonymous / enable_ie6_bg_image_caching.js
Created October 15, 2010 17:51
yay!!
try {
$.browser.msie && $.browser.version < 7
&& document.execCommand( 'BackgroundImageCache', false, true );
} catch(e) { };
@mrdoob
mrdoob / RequestAnimationFrame.js
Created February 22, 2011 14:50
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
@boazsender
boazsender / jquery.pubsub.js
Created May 8, 2011 02:55
Implementing what a static jQuery pubsub might look like even though everyone hates the idea.
/*
usage:
$.bind('customEvt', function( event ){
console.log( event );
});
$.trigger('customEvt');
*/
@corydorning
corydorning / jquery-stripeRows.js
Created May 12, 2011 15:53
Simple jQuery table striping
/*
* jQuery Table Striping - v0.1 - 05/12/2011
* http://corydorning.com, http://justinrains.com
*
* Dual licensed under 'Use it like you stole it'
* and 'We Don't Care'.
*
* Description: Stripe table rows easily by calling 'stripeRows'
* on any collection of <tr> elements and passing in the desired
* colors.
@corydorning
corydorning / dialog._makedraggable
Created September 22, 2011 19:22
jQuery UI Dialog - Remove Containment
$.ui.dialog.prototype._makeDraggable = function() {
this.uiDialog.draggable({
containment: false,
handle: '.ui-dialog-titlebar'
});
};
@corydorning
corydorning / Cross-Browser ::before and ::after pseudo-class polyfill
Last active February 18, 2022 00:24
Cross-Browser ::before and ::after pseudo-class polyfill
/* =============================================================================
CSS Declarations
========================================================================== */
/* ==|== The Standard Way =================================================== */
.foo::before {
/* ...css rules... */
}
@Potherca
Potherca / README.md
Last active November 27, 2023 17:44
Create a branch on Github without access to a local git repo using http://hurl.eu/

Ever had the need to create a branch in a repo on Github without wanting (or being able) to access a local repo?

With the aid of [the Github API][1] and any online request app this is a piece of cake!

Just follow these steps:

  1. Open an online request app (like apirequest.io, hurl.it pipedream.com, reqbin.com, or webhook.site)
  2. Find the revision you want to branch from. Either on Github itself or by doing a GET request from Hurl: https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs/heads
  3. Copy the revision hash
  4. Do a POST request from Hurl to https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs with the following as the POST body :
@kizu
kizu / dabblet.css
Created November 28, 2012 13:04
CSS Dot Leaders With Textured Background
/**
* CSS Dot Leaders With Textured Background
*/
html {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
font: 20px/1.4 Helvetica, Arial sans-serif
}
@justinbmeyer
justinbmeyer / jsmem.md
Last active June 29, 2024 16:00
JS Memory

JavaScript Code

var str = "hi";

Memory allocation:

Address Value Description
...... ...
@dashed
dashed / gulpfile-env.js
Created January 7, 2014 12:38
Interesting and useful gulp snippets.
/*
From https://github.com/gulpjs/gulp/issues/101. Organize gulpfile.js using concept of environment variables.
1. Set up sub-tasks to behave in a certain according to env var; may be env agnostic.
2. Set up high-level tasks to run a group of sub-tasks to orchestrate a behaviour (testing, staging, prod, etc)
*/
var R = 0;
var ENV_SWITCH = void 0;