Skip to content

Instantly share code, notes, and snippets.

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

Jared Williams jaredwilli

🏄‍♂️
View GitHub Profile

What are we trying to observe? Raw object data.

// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
 
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];
///////////////////////////////////////////////////////////////////////////////////////////
// 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 );
/*!
* jQuery whenthen - v0.2 - 3/12/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($){
@jaredwilli
jaredwilli / preloader.js
Created May 7, 2011 19:16 — forked from adamesque/preloader.js
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.
@jaredwilli
jaredwilli / gameengines.md
Created July 26, 2011 17:46 — forked from bebraw/gameengines.md
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.

Name Latest Release Size (KB) License Type Unit Tests Docs Repository Notes
Akihabara 1.3.1 (2011/05) 453 GPL2, MIT Classic Repro no API github Intended for making classic arcade-style games in JS+HTML5
Aves Commer-cial Obsolete. Company bought by Zynga. E3 2010 Aves Engine Prototype "Suburban World"
bdge github Badly Design Game Engine, an HTML5 Javascript game engine [Demo](h
@jaredwilli
jaredwilli / README
Created October 4, 2011 17:05 — forked from joelambert/README
Drop in replacements for setTimeout()/setInterval() that makes use of requestAnimationFrame() where possible for better performance
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
@jaredwilli
jaredwilli / HelloDartTest.dart
Created October 12, 2011 11:50
Dart Compilation
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// Simple test program invoked with an option to eagerly
// compile all code that is loaded in the isolate.
// VMOptions=--compile_all
class HelloDartTest {
static testMain() {
print("Hello, Darter!");
@jaredwilli
jaredwilli / LICENSE.txt
Created November 7, 2011 15:42 — forked from Kambfhase/LICENSE.txt
Brainfuck139
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Kambfhase
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@jaredwilli
jaredwilli / jsconf2011-talks.txt
Created November 20, 2011 18:36 — forked from mattpodwysocki/jsconf2011-talks.txt
JSConf talks and resources
Track A
Bytes and Blobs – David Flanagan @__DavidFlanagan
Slides: http://davidflanagan.com/Talks/jsconf11/BytesAndBlobs.html
Conference Wifi Redux - Malte Ubi @cramforce
Sashimi: https://github.com/cramforce/Sashimi
Slides: http://social-traffic.streamie.org/preso/static/#slide1
Run Your JS everywhere with Jellyfish – Adam Christian @admc