Skip to content

Instantly share code, notes, and snippets.

View justinrainbow's full-sized avatar

Justin Rainbow justinrainbow

View GitHub Profile
[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/"
@justinrainbow
justinrainbow / php.rb
Created January 31, 2011 23:05
homebrew formula for installing php 5.3.3
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'
<?php
// this is valid php
$foo = $bar ?: 'baz';
// it's the equivalent to
$foo = isset($bar) && $bar ? $bar : 'baz';
<?php
// Application/HelloBundle/Author.php
class Author
{
/**
* @validation:NotBlank()
* @validation:MinLength(3)
*/
private $firstName;
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'
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