/Library/Server/Web/Data/Sites/Default/設定ファイルは、
/etc/apache2/sites/0000_any_80_.confシステム環境設定→共有→Web共有→コンピュータのWebサイトフォルダを開く... からだと、
/Library/WebServer/Documentsが開かれてしまうので注意する。
/Library/Server/Web/Data/Sites/Default/設定ファイルは、
/etc/apache2/sites/0000_any_80_.confシステム環境設定→共有→Web共有→コンピュータのWebサイトフォルダを開く... からだと、
/Library/WebServer/Documentsが開かれてしまうので注意する。
npm config set registry http://registry.npmjs.org/
vimdiff file1 file2 [file3 [file4]]
gvim -d file1 file2 [file3 [file4]]
alias gvimdiff='gvim -d' #もし無ければaliasを設定
gvimdiff file1 file2 [file3 [file4]]
[c
]c
do
dp
$ git clone ssh://username@server/~/myrepo.git
bash: git-upload-pack: command not found
fatal: The remote end hung up unexpectedly
$ which git-upload-pack
/home/username/local/bin/git-upload-pack
git clone --upload-pack=/home/username/local/bin/git-upload-pack ssh://username@server/~/myrepo.git
git config remote.origin.uploadpack /home/username/local/bin/git-upload-pack
$ wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p180.tar.bz2
$ tar jxvf ruby-1.9.2-p180.tar.bz2
$ cd ruby-1.9.2-p180
ホームディレクトリ直下のlocalにインストールする。
$ ./configure --prefix=$HOME/local
$ make
$ make install
前略
export PATH=$HOME/local/bin:$PATH
$ . .bash_profile
$ wget http://rubyforge.org/frs/download.php/74886/rubygems-1.8.3.tgz
$ tar zxvf rubygems-1.8.3.tgz
$ cd rubygems-1.8.3
$ ruby setup.rb
$ gem install rev-websocket
$ cp -r ~/local/lib/ruby/gems/1.9.1/gems/rev-websocket-0.1.3/examples/public ~/www
$ cd ~/www/public
エディタでecho.htmlを開く
WS_URL = "ws://localhost:8081"; を WS_URL = "ws://サーバーのホスト名:8081"; に修正
$ ruby ~/local/lib/ruby/gems/1.9.1/gems/rev-websocket-0.1.3/examples/echo.rb
start on 0.0.0.0:8081
server: Hello, world!
client: hello
Sun May 22 2011 09:41:40 GMT+0900 (JST)connecting to ws://ホスト名:8081...
Sun May 22 2011 09:41:40 GMT+0900 (JST)connected.
Sun May 22 2011 09:41:40 GMT+0900 (JST)message sent: client: hello
Sun May 22 2011 09:41:40 GMT+0900 (JST)message received: server: Hello, world!
Sun May 22 2011 09:41:40 GMT+0900 (JST)message received: client: hello
Sun May 22 2011 10:17:32 GMT+0900 (JST)disconnected...