function setup() {
rect( 0, 0, 100, 100 );
}
function draw() {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
REDS | |
Primary: #890d0d; | |
Hover: #a62929; | |
Active: #d63838; | |
BLUES | |
Primary: #0D7089; | |
Hover: #298da6; | |
Active: #38b6d6; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('lodash'); | |
module.exports = function(grunt) { | |
grunt.registerMultiTask('check', 'Check for the existence of files', function() { | |
var filesMissing = false; | |
// Flatten the nested source arrays -- I used _.flatten, there are other methods | |
_.flatten( this.data ).forEach(function( filepath ) { | |
if ( ! grunt.file.exists(filepath) ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Linear Congruential Generator | |
// Variant of a Lehman Generator | |
var lcg = (function() { | |
// Set to values from http://en.wikipedia.org/wiki/Numerical_Recipes | |
// m is basically chosen to be large (as it is the max period) | |
// and for its relationships to a and c | |
var m = 4294967296, | |
// a - 1 should be divisible by m's prime factors | |
a = 1664525, | |
// c and m should be co-prime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TO mmadness :depth | |
if :depth < 1 [forward 10 back 10 stop] | |
forward :depth * 10 * 2 | |
right 90 | |
forward :depth * ( 10 * ( :depth / 5 ) ) | |
left 90 | |
mmadness :depth - 1 | |
right 90 | |
back :depth * ( 10 * ( :depth / 5 ) ) | |
left 180 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('body').append('<div class="container"></div>'); | |
_.times(10, function() { | |
_.times(100, function(){ | |
var $div = $('<div/>'); | |
$div.addClass('line'); | |
var rand = Math.random(); | |
if (rand < 0.33) { | |
$div.addClass('left'); | |
} else if (rand > .67) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/class-wp-json-posts.php b/lib/class-wp-json-posts.php | |
index 941c796..599e8af 100644 | |
--- a/lib/class-wp-json-posts.php | |
+++ b/lib/class-wp-json-posts.php | |
@@ -1090,6 +1090,23 @@ class WP_JSON_Posts { | |
} | |
/** | |
+ * Embed post type data into taxonomy data | |
+ * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/class-wp-json-posts.php b/lib/class-wp-json-posts.php | |
index 941c796..a06ed0f 100644 | |
--- a/lib/class-wp-json-posts.php | |
+++ b/lib/class-wp-json-posts.php | |
@@ -519,9 +519,10 @@ class WP_JSON_Posts { | |
* | |
* @param string|object $type Type name, or type object (internal use) | |
* @param boolean $_in_collection Is this in a collection? (internal use) | |
+ * @param boolean $_in_taxonomy Is this request being added to a taxonomy record? (internal use) | |
* @return array Post type data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/class-wp-json-posts.php b/lib/class-wp-json-posts.php | |
index 941c796..a06ed0f 100644 | |
--- a/lib/class-wp-json-posts.php | |
+++ b/lib/class-wp-json-posts.php | |
@@ -519,9 +519,10 @@ class WP_JSON_Posts { | |
* | |
* @param string|object $type Type name, or type object (internal use) | |
* @param boolean $_in_collection Is this in a collection? (internal use) | |
+ * @param boolean $_in_taxonomy Is this request being added to a taxonomy record? (internal use) | |
* @return array Post type data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = [ | |
'offset', // (int) - number of post to displace or pass over. Warning: Setting the offset parameter overrides/ignores the paged parameter and breaks pagination (Click here for a workaround). The 'offset' parameter is ignored when 'posts_per_page'=>-1 (show all posts) is used. | |
'posts_per_archive_page', // (int) - number of posts to show per page - on archive pages only. Over-rides posts_per_page and showposts on pages where is_archive() or is_search() would be true. | |
// 'showposts', // <replaced by posts_per_page> | |
'nopaging', // (boolean) - show all posts or use pagination. Default value is 'false', use paging. | |
'post_type', // (string / array) - use post types. Retrieves posts by Post Types, default value is 'post'. | |
'post_status', // (string / array) - use post status. Retrieves posts by Post Status. Default value is 'publish', but if the user is logged in, 'private' is added. | |
'category__in', // (array) - use ca |