This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.33.21" |
This file contains 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 | |
Response::macro('inlineImage', function($path, $name = null, $lifetime = 0) | |
{ | |
if (is_null($name)) { | |
$name = basename($path); | |
} | |
$filetime = filemtime($path); | |
$etag = md5($filetime . $path); |
This file contains 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
curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin |
This file contains 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'); | |
var notify = require('gulp-notify'); | |
var codecept = require('gulp-codeception'); | |
var _ = require('lodash'); | |
gulp.task('runtest', function() { | |
var options = testCodeceptOptions('api', 'categoryProductApiCest'); | |
gulp.src('codeception.yml') | |
.pipe(codecept('./vendor/bin/codecept', options)) | |
.on('error', notify.onError(testNotification('fail', 'codeception'))) |
This file contains 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'); | |
var notify = require('gulp-notify'); | |
var codecept = require('gulp-codeception'); | |
var changed = require('gulp-changed'); | |
var open = require('gulp-open'); | |
var watch = require('gulp-watch'); | |
var debug = require('gulp-debug'); | |
var _ = require('lodash'); | |
gulp.task('runtest', function() { |
This file contains 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 = { |
This file contains 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 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 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 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 |
OlderNewer