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
<?php | |
class GenericSymfonyForm extends sfForm | |
{ | |
static public $choices; | |
public function configure() | |
{ | |
$this->disableCSRFProtection(); |
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
<VirtualHost *:80> | |
ServerAdmin foo@localhost | |
ServerName foo.domain.net | |
DocumentRoot /home/foouser/project/web | |
<Directory /> | |
Options FollowSymLinks |
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/bash | |
if [ "$1" == "" ]; then | |
echo "Usage: $0 <database> [output-path]" | |
exit 1 | |
fi | |
TABLES=`mysql -h localhost -u someuser -p somepasswd "select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA='$1'"` | |
OUT="$2" |
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
<?php | |
/* | |
Selenium Testing Requirements: | |
- phpunit 3.7+ | |
- Selenium test case extension to PHPUnit installed with pear: | |
~ pear install phpunit/Selenium_Test_Case |
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
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
jQuery('#clickme').bind('click', function(){ | |
var q = random(); | |
jQuery('.imgframe').hide(); | |
jQuery('.imgframe').css('background-image', "url('mainpic"+ q +".jpg')" ); |
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
<?php | |
function paginated_links( $totalRecs , $pageSize = 1000, $k=8) | |
{ | |
$numPages = $totalRecs / $pageSize ; | |
$numPages = intval( $numPages ); |
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
<?php | |
/** | |
* | |
* | |
* Factory to create database connections based on URI | |
* | |
* URI: dbtype://user:password@server/database | |
* | |
* |
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
/* | |
* Super Unique | |
*/ | |
public function super_unique(array $badarray) | |
{ | |
$goodarray = array(); | |
foreach( $badarray as $ba ) | |
{ |
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
<?php | |
$dh = opendir('.'); | |
while (false !== ($filename = readdir($dh))) | |
{ | |
$files[] = $filename; | |
} | |
sort($files); | |
foreach( $files as $file) | |
{ | |
if( |
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
<?php | |
class ColorCLI | |
{ | |
static $foreground_colors = array( | |
'black' => '0;30', 'dark_gray' => '1;30', | |
'blue' => '0;34', 'light_blue' => '1;34', | |
'green' => '0;32', 'light_green' => '1;32', | |
'cyan' => '0;36', 'light_cyan' => '1;36', | |
'red' => '0;31', 'light_red' => '1;31', |