2009年11月16日 星期一

在OSX下製作USB image備份

I recently downloaded an Ubuntu image for netbooks, and I needed to install this onto a USB flash drive so I could boot it. This is pretty simple with OS X and Disk Utility and dd from the command line. Be sure your flash drive is large enough to hold the disk image.
* Plug the flash drive into a USB port and launch Disk Utility.
* Select the flash drive and press apple+i to bring up the info
* remember the device id, it will be diskN where N is a number, such as disk4
* select the volume (not the device) and click unmount.
* open a terminal window, and type:
sudo dd if=/path/to/file.img of=/dev/disk4 bs=1024Be sure to use your path to the image file, and the device id you got from disk utility in place of "disk4". You can drag the .img file into the terminal window if you don't want to type the full path to it.
Now wait a bit for the image to be written. When its done you will get something similar to this:969568+0 records in
969568+0 records out
992837632 bytes transferred in 521.666371 secs (1903204 bytes/sec)

2009年8月21日 星期五

把酒問月 李白

青天有月來幾時?我今停盃一問之。
 人攀明月不可得,月行卻與人相隨。
 皎如飛鏡臨丹闕,綠煙滅盡清暉發。
 但見宵從海上來,寧知曉向雲間沒。
 白兔擣藥秋復春,姮娥孤棲與誰鄰?
 今人不見古時月,今月曾經照古人。
 古人今人若流水,共看明月皆如此。
 唯願當歌對酒時,月光長照今罇裏。

2009年3月29日 星期日

mysql亂碼

mysql_query("SET NAMES 'UTF8'",$dataname);
加在你連線字串檔的最後一行即可。

2009年2月12日 星期四

不愛穿褲子的國王

話說,童話小說寫到一半

總沒說那"看見"國王沒穿褲子的孩子怎麼了


其實真實的結果是,那裁縫說服了國王


:【為了身體健康,光著屁股才不會生病



至於那小孩,肯定是因為我不肯幫他做新衣,挾怨報復

只要,公佈下次說國王光屁股的,就用洩漏國家機密罪砍頭

這種事情就不會再發生了!】


神奇的是,國王就這麼做了!


哈哈!國王喜歡光屁股,逼他也沒用~


法律釋疑:【看見】


【掀開而看見光屁股】、【直接看見光屁股】應該是不同的兩種結果。



2009年2月1日 星期日

ubuntu 下安裝 itunes server

習慣用 joe

sudo apt-get install joe




下載 WebMin

wget http://jaist.dl.sourceforge.net/sourceforge/webadmin/webmin_1.450_all.deb

安裝

sudo dpkg -i webmin_1.450_all.deb

修捕Webmin

sudo apt-get -f install

https://WebMinServer:10000/

搞定~


安裝 daapd

參考這裡

http://wiki.mt-daapd.org/wiki/Main_Page


安裝sudo apt-get install mt-daapd


http://yourserver:3689/


內建密碼是mt-daapd

呼~ easy


相關指令

#/etc/init.d/mt-daapd start 啟動

#/etc/init.d/mt-daapd restart 重開再啟

#/etc/init.d/mt-daapd stop 停機

***************************




安裝新硬碟看這裡!

http://wiki.ubuntu.org.cn/index.php?title=安装新硬盘&variant=zh-tw