This file contains 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
/* | |
Learn to code with Kelis' Milkshake | |
http://en.wikipedia.org/wiki/Milkshake_(song) | |
Created by Brendan Dawes brendandawes.com | |
Modified by Samuel Cotterall samuelcotterall.com | |
*/ | |
// "my milkshake brings all the boys to the yard" | |
var milkShake, |
This file contains 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 userInfo = passport.deserializeUser(function(id){ | |
return id; | |
}); | |
User.findById(userInfo, function(err, user) { | |
}); |
This file contains 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
function newsPost_block_func() { | |
global $post; | |
$args = array(); | |
$query = new WP_Query($args); | |
var_dump($query->have_posts()); | |
} | |
add_shortcode( 'newsPost_block', 'newsPost_block_func'); |
This file contains 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
function newsPost_block_func() { | |
global $post; | |
$args = array( | |
'post_type' => array( 'post' ), | |
); | |
$query = new WP_Query($args); | |
var_dump($query->have_posts()); | |
} | |
add_shortcode( 'newsPost_block', 'newsPost_block_func'); |
This file contains 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
// declarations | |
var positions = []; | |
// Returns a random integer between min (included) and max (excluded) | |
// Using Math.round() will give you a non-uniform distribution! | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min)) + min; | |
} | |
// generate random positions |