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
--- BootstrapFile.php (saved version) | |
+++ (current document) | |
@@ -106,9 +106,11 @@ | |
define('APPLICATION_PATH', $this->_applicationDirectory->getPath()); | |
$applicationOptions = array(); | |
$applicationOptions['config'] = $this->_applicationConfigFile->getPath(); | |
+ | |
+ $env = getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'; | |
$this->_applicationInstance = new Zend_Application( |
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
/** | |
* original http://groups.google.com/group/doctrine-user/browse_thread/thread/8674c5f27de54e0c | |
*/ | |
public function toHierarchy($collection) | |
{ | |
// Trees mapped | |
$trees = array(); | |
$l = 0; |
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 | |
/** | |
* UploadController | |
* | |
* @author | |
* @version | |
*/ | |
class UploadController extends Zend_Controller_Action |
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
map $scheme $fastcgi_https { ## Detect when HTTPS is used | |
default off; | |
https on; | |
} |
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
<? | |
/* | |
Name: nameparse.php | |
Version: 0.2a | |
Date: 030507 | |
First: 030407 | |
License: GNU General Public License v2 | |
Bugs: If one of the words in the middle name is Ben (or St., for that matter), | |
or any other possible last-name prefix, the name MUST be entered in | |
last-name-first format. If the last-name parsing routines get ahold |
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
du -h /var/spool/imap/[a-z]/user | egrep -v ".*[a-z]/user/.*/" | egrep .*[a-z]/user/ |
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 | |
$user="USERNAME"; | |
$password="PASSWORD"; | |
$database="DATABASE"; | |
mysql_connect('localhost',$user,$password); | |
mysql_select_db($database) or die( "Unable to select database"); | |
// Query all the audio nodes. | |
$q = <<<SQL |
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
#!bash | |
# | |
# bash/zsh completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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
#### THE Output of this PHPUnit test is | |
..//test.css?v=1323800589//test.css?v=1323800589. | |
<?php | |
$result = $this->object->revver('/test.css'); | |
print $result; | |
$hello = file_put_contents($_SERVER['DOCUMENT_ROOT'] . '/test.css', '/** Just a dummy file for testing */'); | |
//$this->assertNotEquals($result, $this->object->revver('/test.css')); | |
print $this->object->revver('/test.css'); |
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 | |
# | |
# php-cgi - php-fastcgi swaping via spawn-fcgi | |
# | |
# chkconfig: - 85 15 | |
# description: Run php-cgi as app server | |
# processname: php-cgi | |
# config: /etc/sysconfig/phpfastcgi (defaults RH style) | |
# pidfile: /var/run/php_cgi.pid | |
# Note: See how to use this script : |