Skip to content

Instantly share code, notes, and snippets.

View jaredwilli's full-sized avatar
🏄‍♂️

Jared Williams jaredwilli

🏄‍♂️
View GitHub Profile
@paulirish
paulirish / gist:704386
Created November 17, 2010 23:55
10 or 11 or 12 things i learned from the jquery source
/*
.d dP"Yb dP"Yb 88""Yb .d .d dP"Yb 88""Yb .d oP"Yb. 888888 88 88 88 88b 88 dP""b8 .dP"Y8
.d88 dP Yb dP Yb 88__dP .d88 .d88 dP Yb 88__dP .d88 "' dP' 88 88 88 88 88Yb88 dP `" `Ybo."
88 Yb dP Yb dP 88"Yb 88 88 Yb dP 88"Yb 88 dP' 88 888888 88 88 Y88 Yb "88 o.`Y8b
88 YbodP YbodP 88 Yb 88 88 YbodP 88 Yb 88 .d8888 88 88 88 88 88 Y8 YboodP 8bodP'
88 88 888888 db 88""Yb 88b 88 888888 8888b. 888888 88""Yb dP"Yb 8b d8
@bebraw
bebraw / gameengines.md
Created January 6, 2011 18:07
List of JS game engines. You can find a wikified version at https://github.com/bebraw/jswiki/wiki/Game-Engines. Feel free to modify that. I sync it here every once in a while.

IMPORTANT! Remember to check out the wiki page at https://github.com/bebraw/jswiki/wiki/Game-Engines for the most up to date version. There's also a "notes" column in the table but it simply does not fit there... Check out the raw version to see it.

This table contains primarily HTML5 based game engines and frameworks. You might also want to check out the [[Feature Matrix|Game-Engine-Feature-Matrix]], [[Game Resources]] and [[Scene Graphs]].

Name Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
AllBinary Platform Platform Dependent AllBinary 2D/2.5D/3D n
@k33g
k33g / gist:778460
Created January 13, 2011 19:42
java like inheritance and shameful use of prototype
function Human(){
var that = this;
var name="John Doe";
that.getName=function(){return name;}
that.setName=function(value){name=value;}
return that;
}
function Man(){
@cowboy
cowboy / jquery15-sub-example.js
Created January 31, 2011 21:04
jQuery.sub() "module-specific jQuery extensions" usage example for jQuery 1.5
// Your module.
(function($uper){
var $ = $uper.sub();
// This method ONLY exists inside this IIFE.
$.fn.remove = function() {
if ( confirm( "Really remove " + this.length + " elements?" ) ) {
// Execute (and return the value of) the main jQuery .remove method.
return $uper.fn.remove.apply( this, arguments );
@netconstructor
netconstructor / functions.php
Created February 5, 2011 04:30
Drag & Drop (functions.php code and referenced JS file below)
///////////////////////////////////////////////////////////////////////////////////////////
// CODE TO ADD POST PER PAGE FILTER
///////////////////////////////////////////////////////////////////////////////////////////
add_filter( 'edit_posts_per_page', 'reorder_edit_posts_per_page', 10, 2 );
function reorder_edit_posts_per_page( $per_page, $post_type ) {
// CHECK USER PERMISSIONS
if ( !current_user_can('edit_others_pages') )
return;
$post_type_object = get_post_type_object( $post_type );
@unscriptable
unscriptable / tiny Promise.js
Created February 7, 2011 06:02
A minimalist implementation of a javascript promise
// (c) copyright unscriptable.com / John Hann
// License MIT
// For more robust promises, see https://github.com/briancavalier/when.js.
function Promise () {
this._thens = [];
}
Promise.prototype = {
@adamesque
adamesque / preloader.js
Created February 16, 2011 23:38
Uses jQuery's new Deferred object to help with image loading
/**
* Helper function for passing arrays of promises to $.when
*/
jQuery.whenArray = function ( array ) {
return jQuery.when.apply( this, array );
};
/**
* Accepts a single image src or an array of image srcs.
@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 ||
@ded
ded / domready.js
Created February 24, 2011 08:46
Smallest x-browser DOM Ready, ever
function r(f){/in/(document.readyState)?setTimeout(r,9,f):f()}
@mklabs
mklabs / github-flavored-markdown.md
Created March 1, 2011 09:47
GitHub Flavored Markdown #test #github #markdown

GitHub Flavored Markdown

View the source of this content.

Let's get the whole "linebreak" thing out of the way. The next paragraph contains two phrases separated by a single newline character:

Roses are red Violets are blue