ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime in terminal:
$ sublime filename $ sublime . (open the directory)
In home dir, create a file: .gemrc (on linux, maybe on mac)
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
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 .
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.
require 'pp' pp(ENV) Usage: pp(any_variable)
just like var_dump in php
$ sudo locale-gen zh_TW.UTF-8 $ sudo update-locale LANG=zh_TW.UTF-8 reload your bash profile
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)
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
其實有點有趣
今天由於某些因素在測試 iOS app
於是開了許久沒動的 xcode
更新了一下發現多了一些 retina 的模擬器
也沒想那麼多就把它 run 到模擬器上
但模擬器一開出來我還以為是模擬器壞掉 XDDDD
它的 home 鍵勒~~~~~
其實是因為 iOS 5 以後的 simulater 沒有 home 鍵
叫出 home 鍵 command+shift+h
調整大小 command+ 1 or 2 or 3
最近在開 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 .