Skip to content

Instantly share code, notes, and snippets.

@markreale
markreale / mediaSizeCheck.js
Created May 28, 2013 19:35
Check when an interface passes a media query threshold.
var checker = 0;
$(window).resize(function(){
if(window.matchMedia){
var mq = window.matchMedia( "(min-width: 940px)" );
var aMatch = mq.matches;
if(checker == 0){
if(aMatch) {
return;
@markreale
markreale / wordpress_query.php
Last active October 5, 2015 17:07
A Full WordPress Query
<?php
// Gather all of the parameters / filters to be used in your database query as an array of arguments
$args = array(
'post_type' => 'page',
'page_id' => '2064',
'posts_per_page' => '1',
'cat' => '7',
'offset' => '7',
'paged' => '7',
'orderby' => 'rand',