2012年7月30日 星期一

如何手動壓縮Parallels 上面的虛擬硬碟大小


#prl_disk_tool merge --hdd "Windows 7.pvm/Windows 7.hdd"
操作方法:
1.prl_disk_tool merge --hdd
2.選擇你要壓縮的虛擬OS,例如windos 7 .pvm 立面的虛擬硬碟"windows 7.hdd"


2.壓縮
Compacting Virtual Disks
When compacting virtual disks, the utility has the following syntax:
prl_disk_tool compact [--buildmap] --hdd <disk_path> [--force]
prl_disk_tool compact -i,--info --hdd <disk_path>

Parameters
compact
Removes all empty blocks from the expanding virtual disk and reduces its size on your physical disk. The disk to be compacted must be formatted as NTFS, FAT 16, FAT 32, ext2, or ext3. You can also try to compact virtual disks with other filesystems using the --buildmap option.
--hdd <disk_path>
Full path to the virtual disk to be configured.
--buildmap
Compacts virtual disks with unsupported filesystems.
--force
Forces the compacting operation for suspended virtual disks.
-i, --info
Do not compact the virtual disk; just display the information about the size the disk will have after compacting.

2012年7月26日 星期四

抄襲與創作的差別

以前在大學時上國文課,老師講了一個笑話,如果你參考一篇文章而寫的文章,叫做臨摹

抄十篇文章而且創作的文章,叫做抄襲,參考一百篇文章,而寫出來的就叫做創作

現在回到軟體功能本身而言,什麼叫做抄襲,什麼叫做創新,常常有人說,Apple的這個

功能,某某公司在n年前就有了,但卻到了今天才被世人廣為認識,這樣這個功能是創新

嘛?我不知道這兩種類別的比喻是否可以通用,感覺似乎類似,但仔細一想,卻又不是那麼的

相似,因為一樣的概念,但實作上不同,這是創作還是抄襲?

Hard limit 跟Soft limit的差別

Hard limit:  一般指不管任何狀況下,使用者都不被允許超出使用限制量

Soft limit: 則是允許使用者在一定時間範圍內,可以使用超過使用限制量,之後才會作處理(甚至根本不處理),在軟體功能上,常常會有所謂的paper license 

    或paper limitation,意思是我只是用文字寫下上限使用量,但不直接限制使用者的過量使用,唯一用處就是當客戶超量使用時,公司不對該廠品作保固,因為

不是正常的允許使用狀況

在 MAC上面如何找出所有的symbolic link

這是從網路上看來的,作者的使用環境是在linux上面,不過既然Mac是unix like os

使用上當然也沒問題。

範例如下:

如果要找出所有的symbolic link to /Volumes/backup

-iname 等同於-Iname,但檔案路徑就有大小寫之分了
 
# find /path/to/dir -lname /path/to/file
# find / -iname /Volumes/backup
 
或著直接使用 find / -type l  ,找出所有的symbolic link

利用Sybolic link 減少 iTune 佔用的系統硬碟空間

我的系統硬碟是80GB 的SSD,硬碟空間很有限,為了減少系統硬碟使用量,我就把iphone的同步資料移除到其他外接硬碟,

但還是發現每次同步完後,系統硬碟空間就會變得越來越小,後來發現原來iTune再執行同步備份時,還是備份再系統硬碟下面

為了解決這個問題,我就把他建一個symbolic link到外接硬碟,路徑如下

/Users/[使用者名稱]/Library/Application Support/MobileSync/Backup

再Terminal 下面執行下列的指令,這樣之後進行同步,就不會再吃掉太多系統硬碟空間了

 

#mv /Users/[使用者名稱]/Library/Application Support/MobileSync/Backup    /Volumes/XXXXX/Backup

#ln -s  /Volumes/XXXX/Backup   /Users/[使用者名稱]/Library/Application Support/MobileSync/Backup

2012年7月25日 星期三

安裝Centos 5.3 做成 Router

1.設定網卡ip: /etc/syscon

2.開啟 ip_forwarding 

# forwarding
# 讓內部網路的封包可以轉送到外部
echo "1" > /proc/sys/net/ipv4/ip_forward


3.利用iptables 當NAT


4.安裝dhcpd 





2012年7月23日 星期一

Lean Startup 跟 斷捨離的減法概念

1.上週一連聽了兩個對我而言是陌生的名詞,第一個是斷捨離,這是一個日本人推動的一種新的生活態度

,其實仔細一看內容也是跟一些所謂的整理大師一樣,就是要捨得丟棄,每當有新的事項或雜物近來時,

就應該先做決斷,然後做必要的捨棄,然後完全的放下,第二個聽到的是lear startup (精實創業),也

是要創業家,不要做過多的不必要堅持,要把大部分的精力放在真的有business value的地方,總結而言

就是人的精力或企業的資源是有限制的,一定要有所取捨,才能集中資源把事情做好

How to restore a deleted onenote page

復原不小心誤刪的onenote