Skip to content

Instantly share code, notes, and snippets.

View scneptune's full-sized avatar

Stephen Neptune scneptune

  • Native Instruments Gmbh
  • Los Angeles, CA
  • X @scneptune
View GitHub Profile
@scneptune
scneptune / index.html
Created August 25, 2012 01:14
Infinite Mobius Strips - Working an adaptable version of this for a main page.
<div id="container">
@scneptune
scneptune / index.html
Created August 25, 2012 01:14
Working an adaptable version of this for a main page.
<div id="container">
@scneptune
scneptune / index.html
Created October 4, 2012 21:43
A pure CSS3 fancy text banner using transforms, pseudo-elements, last-child, and more!
<div class="banner">
<div class="line">
<span>Fancy Banners</span>
</div>
<div class="line">
<span>Make It Look</span>
</div>
<div class="line">
<span>Nice &amp; Classy</span>
</div>
@scneptune
scneptune / gist:3847736
Created October 7, 2012 10:02 — forked from anonymous/gist:666394
An Ajax Loader for Wordpress internal postings
<!-- http://benalman.com/projects/jquery-urlinternal-plugin/ -->
<script src='<?php bloginfo('template_directory'); ?>/js/jquery.ba-urlinternal.min.js'></script>
<!-- http://www.asual.com/jquery/address/ -->
<script src='<?php bloginfo('template_directory'); ?>/js/jquery.address-1.3.min.js'></script>
<script>
// Original JavaScript by Chris Coyier
// Updated October 2010 by Stewart Heckenberg & Chris Coyier
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Oh, hello, Mexico.</title>
<style type="text/css">
/* Client-specific Styles */
#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
@scneptune
scneptune / script.js
Created November 4, 2013 15:29
The Codecademy Final Blackjack game
// Card Constructor
var Card = function(suit, num){
getNumber = function(num){
return num;
},
getSuit = function(suit){
return suit;
},
getValue = function(num){
var value;
@scneptune
scneptune / crossfading
Created November 16, 2013 09:21
Use the Web Audio API to crossfade between two sources. taken directly from http://www.html5rocks.com/en/tutorials/webaudio/intro/ for the purposes of understanding audio
var CrossfadeSample = {playing:false};
CrossfadeSample.play = function() {
// Create two sources.
this.ctl1 = createSource(BUFFERS.drums);
this.ctl2 = createSource(BUFFERS.organ);
// Mute the second source.
this.ctl1.gainNode.gain.value = 0;
// Start playback in a loop
if (!this.ctl1.source.start) {
@scneptune
scneptune / Responsive Styles for Ooyala
Created April 16, 2014 20:54
Ooyala responsive workaround
if (document.querySelector('div[id*="ooyalaplayer"]') !== null) {
/** Do some vanilla javascript style tag creation **/
var style = document.createElement('style'),
styleTag = 'div[id*="ooyalaplayer"] {' +
' width: 100%!important;' +
' position: relative!important;' +
' padding: 56.3% 0 0 0!important; //56.3% = 16:9 ratio' +
'}' +
'div[id*="ooyalaplayer"] > .video {' +
' position: absolute!important;' +
@scneptune
scneptune / gist:31ffb71b1ce4e3fe6958
Created June 5, 2014 22:17
Test Data for Lyric's filtering
$result = array(
array(
"artist" =>"Big Country",
"song" => "Big Country",
"date" =>"5/28/2014",
"isNew" => true
),
array(
"artist" =>"Willie Nelson",
"song" => "Always on My Mind",
@scneptune
scneptune / formater.js
Created April 7, 2016 23:35
A method to harmonize using the key property names for either featured videos or branded videos.
function findVideoContext(context) {
switch (context) {
case 'branded_videos':
case 'branded_video_ids':
return {
presenterContext: 'branded_videos',
viewContext: 'branded_video_ids'
};
case 'featured_videos':