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
require 'formula' | |
class Apc <Formula | |
url 'http://pecl.php.net/get/APC-3.1.4.tgz' | |
homepage 'http://php.net/manual/en/book.apc.php' | |
md5 '' | |
version '3.1.4' | |
def install | |
Dir.chdir "APC-#{version}" do |
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
require 'formula' | |
def mysql_installed? | |
`which mysql_config`.length > 0 | |
end | |
class Php <Formula | |
url 'http://www.php.net/get/php-5.3.3.tar.gz/from/this/mirror' | |
homepage 'http://php.net/' | |
md5 '5adf1a537895c2ec933fddd48e78d8a2' |
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 | |
// Application/HelloBundle/Author.php | |
class Author | |
{ | |
/** | |
* @validation:NotBlank() | |
* @validation:MinLength(3) | |
*/ | |
private $firstName; |
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 | |
// this is valid php | |
$foo = $bar ?: 'baz'; | |
// it's the equivalent to | |
$foo = isset($bar) && $bar ? $bar : 'baz'; | |
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
require 'formula' | |
def mysql_installed? | |
`which mysql_config`.length > 0 | |
end | |
class Php <Formula | |
url 'http://www.php.net/get/php-5.3.3.tar.gz/from/this/mirror' | |
homepage 'http://php.net/' | |
md5 '5adf1a537895c2ec933fddd48e78d8a2' |
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
[url "[email protected]:"] | |
insteadOf = "gh:" | |
pushInsteadOf = "github:" | |
pushInsteadOf = "git://github.com/" | |
[url "git://github.com/"] | |
insteadOf = "github:" | |
[url "[email protected]:"] | |
insteadOf = "gst:" | |
pushInsteadOf = "gist:" | |
pushInsteadOf = "git://gist.github.com/" |
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 YuiMethod | |
{ | |
protected $selector; | |
protected $helpers; | |
protected $code; | |
public function __construct($selector, $helper = null) | |
{ |
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 | |
$dir = new RecursiveDirectoryIterator(dirname(__FILE__)); | |
$iterator = new RecursiveIteratorIterator($dir); | |
$pattern = '~\{(.+?)\}~im'; | |
$start_char = '{'; | |
$end_char = '}'; |
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 | |
# compl1.php - Redis autocomplete example | |
# download female-names.txt from http://antirez.com/misc/female-names.txt | |
$redis = new Redis(); | |
$redis->connect('127.0.0.1'); | |
# Create the completion sorted set | |
if (!$redis->exists('compl')) { | |
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
# test for the git ps1 script | |
declare -f __git_ps1 >/dev/null | |
if (( $? )) | |
then | |
PS1='[\[\033[34m\w\033[0m]\n[\t \u]\$ ' | |
else | |
PS1='[\[\033[34m\w\033[0m$(__git_ps1 " (\033[0;32m%s\033[0m)")]\n[\t \u]\$ ' | |
fi |
OlderNewer