RVM with Ruby2.0.0-p353 + Rails4.0.2 + Ubuntu12.04(precise64) + php-fpm by Vagrant(clean install) p.s. If you don’t use RVM, you can just follow the instruction from Passenger offcial website. It will be easier. Plus, I installed all these things by Vagrant. First thing to do $ sudo apt-get update $ sudo apt-get upgrade Pre-setup: install necessary packages $ sudo apt-get update $ sudo apt-get install build-essential libssl-dev libpcre3-dev libncurses5-dev libreadline6-dev git vim curl libcurl4-openssl-dev libreadline6 autoconf openssl git-core zlib1g zlib1g-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libgdbm-dev libncurses5-dev automake libtool bison subversion pkg-config libffi-dev Get .

Continue reading

My own computer: host side My VM: guest side knife-solo is a tool for Chef. host side: you need ruby environment! $ gem install knife-solo The only thing you need to install is just knife-solo by ruby! $ knife configure -r . --defaults (產生預設設定檔,內容為空) $ knife cookbook create "package" $ knife solo bootstrap vagrant@ip.address (bootstrap = prepare + cook, only for the first time) 加入菜單: $ knife cookbook create nginx 在 cookbooks/nginx/recipes/default.

Continue reading

https://github.com/erusev/parsedown download the Parsedown.php and put it into Library folder then edit autoload.php $autoload['libraries'] = array('Parsedown'); then in the view php for tests: $text = 'Hello **Parsedown**!'; $result = Parsedown::instance()->parse($text); echo $result; No need to require or include the file. If you want to load a file with path, you can use the function called file_get_contents: file_get_contents('./markdown/test.md',true); (true: enable path)

Continue reading

sudo rm /var/lib/dpkg/info/oracle-java7-installer* sudo apt-get purge oracle-java7-installer* sudo rm /etc/apt/sources.list.d/*java* sudo apt-get update sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer

Continue reading

其實有點有趣 今天由於某些因素在測試 iOS app 於是開了許久沒動的 xcode 更新了一下發現多了一些 retina 的模擬器 也沒想那麼多就把它 run 到模擬器上 但模擬器一開出來我還以為是模擬器壞掉 XDDDD 它的 home 鍵勒~~~~~ 其實是因為 iOS 5 以後的 simulater 沒有 home 鍵 叫出 home 鍵 command+shift+h 調整大小 command+ 1 or 2 or 3

Continue reading

最近在開 mac 的 iTerm.app 或者是內建的終端機都覺得卡卡的, 之前以為是 .bashrc 載入太多東西導致的,所以把一些掛載的 bin 目錄都註解掉, 但是還是沒解決,心想不對勁,就順手 google 了一下… 我執行了下列語法: $ time /usr/libexec/path_helper PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/ABC/android-sdks/platform-tools:/Users/ABC/android-sdks/tools:/Application/Vagrant/bin"; export PATH; real 0m0.043s user 0m0.001s sys 0m0.002s 接著我把 PATH 的內容寫進 .bash_profile,問題竟然就解決了… 速度飛快~~ 後來看到一篇 .bash_profile vs.bashrc 雖然大家都知道 .bash_profile 是在登入時執行(即是輸入帳號密碼時), 而 .bashrc 是在系統內非登入狀態時開啟 prompt 時執行, 但是!! Mac OSX 是個例外~是個例外~是個例外~…….=.= Mac OS X — an exception An exception to the terminal window guidelines is Mac OS X’s Terminal.app, which runs a login shell by default for each new terminal window, calling .

Continue reading

Author's picture

kerkerj

Cat lover <3

Backend Engineer

Taiwan