Skip to content

Instantly share code, notes, and snippets.

View onishiweb's full-sized avatar

Adam Onishi onishiweb

View GitHub Profile
@onishiweb
onishiweb / SLide Loop
Created November 15, 2012 09:36 — forked from TobyHowarth/SLide Loop
Slide Loop
<?php
/*
Template Name: Homepage
*/
$blog = new WP_Query('category_name=articles&posts_per_page=1');
// $featured_products = new WP_Query('category_name=featured&posts_per_page=10');
// Change to:
$featured_products = get_posts('category_name=featured&posts_per_page=10');
@onishiweb
onishiweb / uri.js
Created April 25, 2012 19:13 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"