Skip to content

Instantly share code, notes, and snippets.

View onishiweb's full-sized avatar

Adam Onishi onishiweb

View GitHub Profile
@onishiweb
onishiweb / simple_copyright.php
Created June 29, 2012 11:38
A simple copyright text generator for WordPress
@onishiweb
onishiweb / feature-carousel-v1.js
Created June 28, 2012 15:24
A feature carousel I made for a client site, evolved into a circular carousel but didn't want to lose the old code...
@onishiweb
onishiweb / wp-highlight-first-2.php
Created June 17, 2012 08:22
Select the first 2 posts on a blog and use a different template to display them
<?php
// Get the WP global paged - this tells you what page number you're on
// (returns either 0 (I think) or page number)
global $paged;
// Check to see whether we've moved on to another page
if( $paged < 2):
// Set a counter
$count = 0;
endif;
?>
shoot: function shoot() {
//console.log("testing 1");
var video = document.getElementById('viewfinder');
var w = video.videoWidth;
var h = video.videoHeight;
var canvas = document.getElementById('capture');
canvas.width = w;
canvas.height = h;
@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"