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
./configure --with-curl --with-config-file-path=/private/etc --with-mysqli --with-mysql --with-apxs2 --with-mcrypt --enable-soap --with-openssl --enable-zip --enable-bcmath --enable-mbstring --enable-sockets |
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/sh | |
### BEGIN INIT INFO | |
# Provides: god | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: God | |
### END INIT INFO |
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/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
<Response> | |
<Say>I will eat your children.</Say> | |
<Play>http://dl.dropbox.com/u/392166/callboxen/9.wav</Play> | |
<Sms to="555-555-5555">Gatebot-9000: I probably just let a murderer into the apartment complex. So be ready for that.</Sms> | |
</Response> |
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 | |
/** | |
* works around PHP's shitty floating point math to properly round numbers | |
* | |
* USE THIS EVERYWHERE BECAUSE FLOATS FUCKING SUCK | |
*/ | |
function super_round($number, $precision = 0) { | |
$power = bcpow(10, $precision); | |
$rounded = round(bcmul($number, $power, 1), 0); | |
return bcdiv($rounded, $power, $precision); |
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 MyTestCase extends PHPUnit_Framework_TestCase { | |
public function testBoolEquality() { | |
$this->assertTrue((true == 'true')); | |
$this->assertTrue((true == (bool)'true')); | |
$this->assertTrue((true == 'false')); | |
$this->assertTrue((true == (bool)'false')); | |
$this->assertTrue((true == (bool)'1')); | |
$this->assertTrue((false == (bool)'0')); | |
$this->assertFalse((true == '')); |
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 | |
require_once 'PHPUnit/Framework.php'; | |
class TimeLoggerListener implements PHPUnit_Framework_TestListener { | |
private $_filename; | |
private $_handle; | |
public function __construct($filename) { | |
$this->_filename = $filename; | |
} |
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 | |
require_once 'PHPUnit/Framework.php'; | |
function foobar(Array $array) { | |
} | |
class FoobarTest extends PHPUnit_Framework_TestCase { | |
/** | |
* @expectedException PHPUnit_Framework_Error |
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
<pre> | |
<?php | |
echo shell_exec('whoami && ps'); | |
echo shell_exec('ps'); | |
?> | |
</pre> |
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
product_list = list of selected products and quantities; | |
global_dunnage = percentage defined by admin; | |
fudge_factor = percentage defined by admin; | |
if ( total_cost meets freight override conditions ): | |
return freight calculation; | |
exit; | |
else: |