Post, Quote, Links on our works...
This is a Tumblr for something technical posts

 

Fixed with the following commands:
$ cd `brew —prefix`
$ git remote add origin https://github.com/mxcl/homebrew.git
$ git fetch origin
$ git reset —hard origin/master
$ brew update
Already up-to-date.

package.json

package.jsonファイルはプロジェクトにおける様々なメタデータを保持するファイル。
{
“name”: “best-practices”,
“description”: “A package using versioning best-practices”,
“version”: “0.0.1”,
“dependencies”: {
“colors”: “0.x.x”,
“express”: “2.3.x”,
“optimist”: “0.2.x”
},
“devDependencies”: {
“mocha”: “1.7.x”
},
“engine”: “node >= 0.4.1”
}
npmパッケージとして公開する場合にはこちらを参照
nameとversionは必須
開発用ツールとしてnpmを利用する場合はdependenciesよりもdevDependenciesに利用するパッケージを記載するほうがいい。
ユニットテスト用のツールやgrunt、gruntのプラグインなどはdevDependenciesに記載する。
バージョンの指定:

上記の例では:”mocha”: “1.7.x”の”1.7.x”でパッケージのバージョンを指定。
ここではmochaのバージョン1.7.系のバージョンを指定している。1.7の範囲内で最新を取得してくるという意味。
package.jsonで指定できるパッケージはnpm installコマンドでインストールできるパッケージと同等。
レンジの指定
例えばv1.5からv1.9までで最新を取得する。という様な指定を行うのがレンジ。
npmではnode-semverを使ってバージョンの管理を行っているそう。
>1.2.3 / 1.2.3よりも新しいバージョンを取得

Ron said
There is one more bug I haven’t seen anybody writing about. If a touch event causes a setTimeout, but that same touch event causes scrolling, that timer will never fire. More information and a workaround here: https://gist.github.com/3755461

Snow Leopard でホスト名を固定する方法 - 守破離

勝手にhostnameがconfigdに切り替えられてて気持ち悪かったので(lockファイルとか残って困る)