May 26, 2009

MacPortsを消す/アンインストールする方法

以下引用。

基本的には赤字のコマンドをターミナルで実行すればいい。

ただしMacPortsを/opt/localでないところにインストールしている場合は適宜変更する必要あり。
またbash以外のシェルを使っている場合も適宜変更する必要があるかも。

MacPortsのバージョンによっては下のコマンドに書かれているファイルやフォルダがない場合もあるかもしれないけど、問題ない。

とのこと。

How do I remove or uninstall MacPorts?

Uninstalling MacPorts can be a drastic step, and depending on the issue you're experiencing, you may not need to do so. If you're unsure, ask on the macports-users mailing list first.

If you need to uninstall MacPorts, and your port command is functioning, have it uninstall all the installed ports by typing this in the Terminal:

sudo port -f uninstall installed

All that will be left in your installation prefix now will be files that were not registered to any port. This includes any configuration files you edited, any databases you created, any files which MacPorts renamed in order to allow a forced installation or upgrade, and the base MacPorts software itself. You may wish to save your configuration files (most are in /opt/local/etc), databases, or any other unique data.

To remove all traces of MacPorts, type this in the Terminal:

sudo rm -rf /opt/local \
/Applications/MacPorts \
/Applications/DarwinPorts \
/Library/Tcl/macports1.0 \
/Library/Tcl/darwinports1.0 \
/Library/LaunchDaemons/org.macports.* \
/Library/StartupItems/DarwinPortsStartup \
/Library/Receipts/MacPorts*.pkg \
/Library/Receipts/DarwinPorts*.pkg

Substitute your own MacPorts prefix for /opt/local, if you've installed MacPorts in a different place.

If you use a shell other than bash (perhaps tcsh), you may need to adjust the above to fit your shell's syntax.

Note that depending on which version of MacPorts you have and which ports you've installed, not all of the above paths will exist on your system. This is ok.

http://guide.macports.org/chunked/installing.macports.uninstalling.html

May 9, 2009

確かに“読めてしまう”Silverlightサンプル

ねとらぼ:確かに“読めてしまう”コピペに2ch住人が「人間すげー」と驚く より。

Yahoo APIとSilverlight(C#)。任意の文章から振り仮名をとってきて、単語ごとにランダムに並び替えるサンプル。