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
| <VirtualHost *:80> | |
| DocumentRoot "/Users/myName/Projects/laravel/public" | |
| ServerName myLaravel.dev | |
| <Directory "/Users/myName/Projects/laravel/public"> | |
| AllowOverride All | |
| Options FollowSymLinks +Indexes | |
| Order allow,deny | |
| Allow from all | |
| </Directory> | |
| </VirtualHost> |
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 | |
| // 用 Closure 取得 Class Private Property | |
| // | |
| // ref: https://ocramius.github.io/blog/accessing-private-php-class-members-without-reflection/ | |
| // 比用 reflection 快很多 | |
| class Example { | |
| private $myName; | |
| public function __construct($name) { |
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
| [alias] | |
| adda = add -A | |
| al = add . | |
| bl = branch -a | |
| br = branch | |
| ci = commit | |
| cim = commit -m | |
| cima = commit -a -m | |
| ck = checkout | |
| fa = fetch --all |
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
| #!/usr/bin/env bash | |
| # Upgrade Base Packages | |
| sudo apt-get update | |
| sudo apt-get upgrade -y | |
| # Install Web Packages | |
| sudo apt-get install -y build-essential dkms re2c apache2 php5 php5-dev php-pear php5-xdebug php5-apcu php5-json php5-sqlite \ | |
| php5-mysql php5-pgsql php5-gd curl php5-curl memcached php5-memcached libmcrypt4 php5-mcrypt postgresql redis-server beanstalkd \ | |
| openssh-server git vim python2.7-dev |
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/sh | |
| wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.9-osx10.10-x86_64.tar.gz | |
| tar xfvz mysql-5.7* | |
| echo "stopping mamp" | |
| sudo /Applications/MAMP/bin/stop.sh | |
| sudo killall httpd mysqld | |
| echo "creating backup" |
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 | |
| for pkg in `dpkg --get-selections | egrep -v deinstall | awk '{print $1}' | egrep -v '(dpkg|apt|mysql|mythtv)'` ; do apt-get -y install --reinstall $pkg ; done |
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
| set nocompatible " 關閉 vi 相容模式,不太確定做什麼用。和 u,及 insert mode 的方向鍵移動有關。 | |
| set t_Co=256 | |
| colorscheme xoria256 | |
| set guifont=Menlo:h16 | |
| set guioptions-=T " Removes top toolbar | |
| set guioptions-=r " Removes right hand scroll bar | |
| set go-=L " Removes left hand scroll bar | |
| set linespace=15 | |
| " set lines=25 加了之後 iTerm 會被設成 25 行 >"< |
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
| var gulp = require('gulp'), | |
| exec = require('child_process').exec, | |
| sys = require('sys'), | |
| util = require('util'); | |
| gulp.task('phpunit', function() { | |
| exec('clear', function(error, stdout, stderr){ | |
| util.puts(stdout); | |
| exec('phpunit', function(error, stdout) { | |
| sys.puts(stdout); |
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
| var CompactCommand= function(){ | |
| var self = this; | |
| this.start = new Date(); // measure running time | |
| this.exec = function(){ | |
| printDbStats(); // before dbstats | |
| execCommand(); | |
| printDbStats(); // after dbstats | |
| } | |
| this.calcExecTime = function(){ | |
| var end = new Date(); |
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
| /* Gulpfile | |
| * Mike Erickson | |
| */ | |
| var gulp = require('gulp'), | |
| notify = require('gulp-notify'), | |
| phpspec = require('gulp-phpspec'); | |
| gulp.task('phpspec', function() { | |
| var options = { |