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 | |
class EIterableActiveRecord extends CActiveRecord | |
{ | |
public function getIter($buffer_size) | |
{ | |
return new ActiveRecordIterator($this,$buffer_size); | |
} | |
} | |
class ActiveRecordIterator implements Iterator |
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 | |
/* | |
* Directory enumeration and presentation for jQuery TreeView Widget | |
* Author: Ryan Bales, 2011 | |
*/ | |
class DirectoryEnumerator | |
{ | |
private $enumeration_list = array(); | |
private $directory; | |
private $public_directory; |
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 | |
/* | |
* Manages migrations for Yii database | |
* | |
* Author: Ryan Bales <[email protected]>, 2011 | |
*/ | |
class DbMigrateCommand extends CConsoleCommand | |
{ | |
const MIGRATION_TABLE = 'Migration'; |
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
(function($) { | |
var serialize = function(type,form) { | |
var data = {}; | |
var first_run_ignore_types = ['submit','checkbox']; | |
form.find('input, select').each(function() { | |
var input_type = $(this).attr('type'); | |
var input_name = $(this).attr('name'); | |
if (first_run_ignore_types.indexOf(input_type) === -1) { | |
// process and push to data |
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
/** | |
* EventEmitter with jQuery 1.7's $.Callbacks(). | |
*/ | |
function EventEmitter() { | |
this.topics = {}; | |
} | |
/** | |
* Listen on the given `topic` event with `fn`. |
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
#!/usr/bin/python | |
import os | |
import sys | |
ignore_paths = ['apps/ppc/templates/_scripts.php'] | |
# chdir to project root | |
os.chdir(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..','..')) | |
# for each path, reset and re-checkout before commit | |
for path in ignore_paths: | |
ignore_file = os.path.join(os.getcwd(),path) |
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
<? | |
class confirm_code | |
{ | |
protected static function generate_random_bytes($length=16){ | |
if(function_exists('openssl_random_pseudo_bytes')) { | |
$rnd = openssl_random_pseudo_bytes($length, $strong); | |
if ($strong === TRUE) | |
return $rnd; | |
} |
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
#!/usr/bin/env node | |
var fs = require('fs'); | |
var moment = require('moment'); | |
if (!!~process.argv.indexOf('-p') && process.argv.length === 4) | |
parseLog(process.argv[3]); | |
else if (!!~process.argv.indexOf('-d')) { | |
var infile = (process.argv.length > 3) ? process.argv[3] : null; | |
dailyAverages(infile); | |
} |
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 fullWidth = 290 | |
var numberOfElements = 7 | |
var positionOffset = 0 | |
process.argv.forEach(function(arg) { | |
var offsetRegexp = /--offset=(\d+)/ | |
if (offsetRegexp.test(arg)) | |
positionOffset = parseInt(arg.replace(offsetRegexp, '$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
01. Die Krupps - Robosapien | |
02. KMFDM - Lust | |
03. Ministry - We Believe | |
04. Decoded Feedback - Breathe | |
05. Front 242 - Red Team | |
06. SA42 - Race of the Human Race | |
07. Portion Control - Swerve | |
08. Noise Unit - Firing Line | |
09. Autodafeh - Treasure Hunt | |
10. Orange Sector - Sturm (Martin Bodewell Remix) |