For homebrew version 0.9.5.
brew -v # => Homebrew 0.9.5
Install the current version of mysql.
# Install current mysql version
brew install mysql
| <?php | |
| /** | |
| * filter valid utf-8 byte sequences | |
| * | |
| * take over all valid bytes, drop an invalid sequence until first | |
| * non-matching byte, start over at that byte. | |
| * | |
| * @param string $str | |
| * @return string | |
| */ |
| alias homestead='function __homestead() { (cd ~/Code/Homestead && vagrant $*); unset -f __homestead; }; __homestead' | |
| # Usage | |
| homestead up | |
| homestead halt | |
| # etc... |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| <?php | |
| use Illuminate\Console\Command; | |
| use Illuminate\Filesystem\Filesystem; | |
| class ViewsCommand extends Command { | |
| /** | |
| * The console command name. | |
| * | |
| * @var string |
| sudo apt-get update | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
| sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' | |
| sudo apt-get install -y vim curl python-software-properties | |
| sudo add-apt-repository -y ppa:ondrej/php5 | |
| sudo apt-get update | |
| sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug |
| <?php | |
| $peoples = array( | |
| array("name" => "jeffrey", "age" => 28), | |
| array("name" => "john", "age" => 20) | |
| ); | |
| // the common way | |
| function array_pluck($toPluck, $arr) { | |
| $ret = array(); | |
| foreach($arr as $item) { |