This file contains hidden or 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 actx = new AudioContext(); | |
var sound = actx.createBufferSource(); | |
var req = new XMLHttpRequest(); | |
var audioFile = 'https://dl.dropboxusercontent.com/u/87705298/136351__djmastah__requiem-3.mp3'; | |
req.open('GET', audioFile, true); req.responseType = 'arraybuffer'; | |
req.onload = function() { | |
actx.decodeAudioData(req.response, function(buffer) { | |
sound.buffer = buffer; |
This file contains hidden or 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
jQuery(function($) { | |
function Demo() { | |
var i, j; | |
$('html').css('perspective', '2000px'); | |
$('body').css({'transition': 'transform 0.1s ease-out'}); | |
var mousePos = {}; | |
$(window).mousemove(function(e) { | |
mousePos.x = e.clientX; | |
mousePos.y = e.clientY; | |
}); |
This file contains hidden or 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
#!/bin/sh | |
echo "# Downloading latest.tar.gz" | |
wget wordpress.org/latest.tar.gz | |
echo "# Extracting" | |
tar -xf latest.tar.gz | |
echo "# Cleaning Up" | |
mv wordpress/* . | |
rm -r wordpress | |
echo "# Setting up mysql" | |
mysql -u root -p -e "create database $1db; grant usage on *.* to $1user@localhost identified by '$2'; grant all privileges on $1db.* to $1user@localhost;" |
This file contains hidden or 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 generated = false; | |
var currentNote = false; | |
var bpm = 600; | |
var sequence = [ | |
squareWave(50, 0.1), | |
sineWave(440, 0.4), | |
squareWave(50, 0.1), | |
sineWave(540, 0.4), | |
squareWave(50, 0.1), |
This file contains hidden or 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
/* | |
Geometry Library | |
All angles are in radian measurements | |
*/ | |
// Point Object | |
function Point(x, y) { | |
if (x.length === undefined) { | |
this.x = x; | |
this.y = y; |
This file contains hidden or 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
registerEntity('player', { | |
poly: [[100, 100], [200, 100], [100, 200]], | |
init: function(that) { | |
}, | |
render: function(that) { | |
ctx.strokeStyle = '#fff'; | |
canvasUtils.drawPolygon(that.poly); | |
} | |
}); |
This file contains hidden or 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
/* | |
Geometry Library | |
All angles are in radian measurements | |
*/ | |
// Point Object | |
function Point(x, y) { | |
this.x = x; | |
this.y = y; | |
}; |
This file contains hidden or 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
/* | |
* CSS matrix3d transform API | |
* Simplification of 3d transforms | |
* Matt Roelle | |
* 2013 | |
* | |
* Dependent on the Sylvester math library (http://sylvester.jcoglan.com/) | |
*/ | |
function Surface() { |
This file contains hidden or 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 regexps = [ | |
{ | |
'regexp': /`([^`]*)`/g, | |
'flag': 'code' | |
}, | |
{ | |
'regexp': /\*\*([^\*]*)\*\*/g, | |
'flag': 'bold' | |
}, | |
{ |
This file contains hidden or 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
/* | |
* CSS matrix3d transform API | |
* Simplification of 3d transforms | |
* Matt Roelle | |
* 2013 | |
* | |
* Dependent on the Sylvester math library (http://sylvester.jcoglan.com/) | |
*/ | |
function Surface() { |