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 | |
/************************************ | |
begin recaps logic | |
************************************/ | |
// default xml file | |
$fbc['xmldir'] = "{$fbc['showfullpath']}/_ugc/xml/recaps/"; | |
$fbc['defaultxmlfile'] = "season-1_episode-1.xml"; | |
if(!isset($fbc['item_a'])) { | |
$nav = simplexml_load_file("{$fbc['xmldir']}manifest.xml"); | |
$attr = $nav->entry[0]->attributes(); |
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 | |
/** | |
* Instead of adding each js file one by one to a page, | |
* we define a chain of dependencies and then just include the top-level components. | |
* | |
* This makes it easier to see what components are being used on a page, | |
* and easier to add/remove/replace components. | |
*/ |
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
/** | |
* Hijack a function with custom behaviour | |
* @param {object} Context object | |
* @param {string} Name of the context object's function | |
* @param {function} Override function | |
* @return {function} Original function | |
*/ | |
function hijack(object, funcName, override) { | |
var original = object[funcName]; | |
object[funcName] = override(original); |
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 TextOverflow = { | |
crop: function(elm) { | |
var w = elm.width(), | |
t = elm.text(), | |
child; | |
elm.html('<span style="overflow: hidden; white-space: nowrap">'+t+'</span>'); | |
child = elm.children(":first-child"); | |
while (t.length > 0 && child.width() > w) { | |
t = t.substr(0, t.length - 1); |
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 | |
chdir(dirname(__FILE__)); | |
require_once '../app/setup.php'; | |
$username = $argv[1]; | |
if (!$username) { | |
echo "usage {$argv[0]} {username} {new_email}\n"; | |
exit; | |
} |
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
#content { | |
background: blue; | |
} |
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
#!/bin/sh | |
PWD=`dirname $0` | |
cd $PWD | |
## memcached | |
~/src/term.sh -t memcached | |
## couchdb | |
~/src/term.sh -t sudo -i -u couchdb couchdb |
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
/** | |
* Generic behaviour for an object which can observe objects | |
* @param {array | object} items | |
*/ | |
Xteam.Observer = function(items) { | |
items = items || []; | |
// wrap items in an array | |
if (typeof items.length == "undefined") { | |
items = [items]; |
OlderNewer