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 HTTP { | |
protected _statusCode; | |
protected function _getStatusCode() { | |
return $this._statusCode; | |
} | |
protected _url; | |
protected function _getUrl() { |
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 | |
FAILURE=0 | |
do_tasks() { | |
if [[ $FAILURE -eq 0 ]]; then | |
echo -e "Running tasks\n" | |
some_command & | |
some_command & | |
some_command & |
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 Traverse implements ArrayAccess { | |
protected $container; | |
function __construct($array) { | |
$this->container = $array; | |
} | |
public function offsetExists($offset) { | |
return isset($this->container[$offset]); | |
} |
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 | |
// apc crashed on my dev box, so overload the methods if they don't exist | |
if (!function_exists('apc_fetch')) { | |
function apc_fetch($key, &$success) { | |
if (!($filename = apc_get_tmpfile($key, $f))) { | |
return false; | |
} | |
if (!($d = fread($f, filesize($filename)))) { |
NewerOlder