This file contains 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
<?php | |
/* | |
* Datastore class | |
* for working with flat file data. | |
* */ | |
class Datastore { | |
public function __construct() { | |
} | |
This file contains 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
.noisy { | |
height: 100%; width: 100%; | |
opacity: 0.2; | |
position: fixed; | |
z-index: -1; | |
background: Transparent url(iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAgAElEQVR4nIy8eyCV2Rc3/qnpNpIxUklCUSJJkojk0khyd8gtFZIkuYWQiBNyz53cSXInYRCSpJNbEpIkSZIkyZw5Y877R87zPafm976/9c95nv3svfb17LXWZ6290dzc7K+oqDjS2NgYkpWVxcXOzl6KBRIUFFyWnZ1dzHhPS0sTDgwMpGloaEzGxcU1GxgY0AFgbm4umZHnzp07nnQ6fZLxrqio2K+qqmoBALa2tpO3bt2atrGxkTp37lwrACQkJIgDwJcvX0IAoK6urhEAysrK0hg8cnJyWikUyix+oKioKH8bGxv68+fPlwDAvn375o8ePdp4+fLlaeZ8jo6ODp2dnblhYWFUANDU1JyxsrISp1AowhkZGfYnT57MqqqqEoyKirLJy8vLO3ToEH1oaIifUV5TU5ODmd+RI0fmmcflwIEDHQDw7Nkz0rt370YnJyeNAeD8+fPaP7Z5oW8RABARESHISLt165ZHa2trF+P98ePHmycnJ6nv3r3riY2NpQHA4OBgCON7cHCwvr29veJC/YXPnz93jY6ONgaAioqKaACorKzkAYDr1683A0BjYyONjY2t3t3dvbSzs3PMzc1tGP7+/m3Ozs48zA0cGRkZBoBXr175S0tLi0dGRrq2t7drAAAPD8+8pqamPwAjTU3NZQkJCRZzc3MTAFBfX+8GAI8ePTI/cOBAPYPfu3fvCgFAQkKi59y5c10AkJGRofHnn3/qnj17tu79+/cp6enparq6urNHjhxpZm6LvLz8MABERUVR09PTeTw9PVvS09PjmbIcnJ6engeAmzdvusrLy0eJi4tLBAYGhnl5edUx8woJCWlydnaeOXToUI2FhUVaQ0MDscg2btyY |
This file contains 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
// Easier to read | |
var pokedex = { | |
"pokedex": [ | |
{ | |
"hex": "001", | |
"dec": "001", | |
"name": "Bulbasaur"}, | |
{ | |
"hex": "002", | |
"dec": "002", |
This file contains 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
// javascript | |
var myvar = "apples"; | |
$("#lastpost").load("/message/userFeed.php?id=foo&name=bar&myvar=" + myvar); | |
// userFeed.php | |
<?php | |
die($_GET); | |
?> |
This file contains 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
/* First draft - not working - BAD memory issues */ | |
window.requestAnimFrame = (function() { | |
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || | |
function( /* function */ callback, /* DOMElement */ element) { | |
window.setTimeout(callback, 1000 / 60); | |
}; | |
})(); | |
This file contains 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
telnet towel.blinkenlights.nl - starwars | |
telnet miku.acm.uiuc.edu | |
This file contains 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
/* Listener Object | |
* For event registration and unregistration | |
*/ | |
var listener = (function() { | |
function listenerAdd(elm, evt, func) { | |
if( elm.addEventListener ) { | |
elm.addEventListener(evt, func, false); | |
} else if( elm.attachEvent ) { | |
elm.attachEvent('on'+evt, func); | |
} |
This file contains 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 FragBuilder = (function() { | |
var applyStyles = function(element, style_object) { | |
for (var prop in style_object) { | |
element.style[prop] = style_object[prop]; | |
} | |
}; | |
var generateFragment = function(json) { | |
var tree = document.createDocumentFragment(); | |
json.forEach(function(obj) { | |
for (part in obj) { |