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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
memory_limit=2048M |
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 Cart { | |
private $status; | |
public function __construct() { | |
$this->status = new EmptyCartStatus($this); | |
} | |
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 | |
if (in_array($name, array_keys($this->calls))) { | |
if ($this->$name($data)) { | |
return $this->dialIn($name, $data); | |
} | |
} else { | |
return "Non-existent call"; | |
} |
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 Foo | |
{ | |
public function hello($name) | |
{ | |
echo "hello".$name; | |
} | |
public function sayWhat() |
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
➜ ~ brew install -V /usr/local/Library/Formula/php53.rb | |
==> Downloading http://www.php.net/get/php-5.3.17.tar.bz2/from/this/mirror | |
Already downloaded: /Users/cirpo/Library/Caches/Homebrew/php53-5.3.17 | |
==> ./configure --prefix=/usr/local/Cellar/php53/5.3.17 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.3 --with-config-file-path=/usr/local/etc/php/5.3 --with-config-f | |
checking whether to enable LIBXML support... yes | |
checking libxml2 install dir... /usr/local/Cellar/libxml2/2.8.0 | |
checking for xml2-config path... /usr/local/Cellar/libxml2/2.8.0/bin/xml2-config | |
checking whether libxml build works... no | |
configure: error: build test failed. Please check the config.log for details. | |
Error: uncaught throw `Failed executing: ./configure --prefix=/usr/local/Cellar/php53/5.3.17 --disable-debug --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.3 --with-config-file-path=/usr/local/etc/php/5.3 --with-config-file-scan-dir=/usr/local/etc/php/5.3/conf.d --with-iconv-dir=/usr --enable-dba --w |
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
~/Sites/ideato/jeep-travel/vagrant(master ✗) vagrant provision | |
[default] Running provisioner: Vagrant::Provisioners::Puppet... | |
[default] Running Puppet with /tmp/vagrant-puppet/manifests/sandbox.pp... | |
stdin: is not a tty | |
warning: Could not retrieve fact fqdn | |
notice: /Stage[main]//Exec[/usr/bin/apt-get update]/returns: executed successfully | |
notice: /Stage[main]/Mysql::Server/Service[mysqld]/enable: enable changed 'false' to 'true' | |
notice: /Stage[main]/Sandbox/Exec[pear-init]/returns: executed successfully | |
notice: /Stage[main]/Sandbox/Exec[phpunit-init]/returns: executed successfully | |
notice: /Stage[main]/Sandbox/Mysql::Db[mydb]/Database[mydb]/ensure: created |
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
class sandbox { | |
package { | |
["php5-cli", "php-pear", "php5-xdebug", "php5-sqlite", "php5-intl", "php5-curl", "php-apc", "apache2", "mysql-server", "php5-mysql", "libapache2-mod-php5"]: | |
ensure => latest; | |
} | |
package { | |
"git-core": | |
ensure => latest; | |
} |
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
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/ " | |
} | |
PS1='\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[01;33m\]$(parse_git_branch)\[\033[0m\]\$ ' | |
export PSI |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html --> | |
<phpunit | |
backupGlobals = "false" | |
backupStaticAttributes = "false" | |
colors = "true" | |
convertErrorsToExceptions = "true" | |
convertNoticesToExceptions = "true" | |
convertWarningsToExceptions = "true" |