Monday, April 30, 2012

Mac 技巧:給雜亂無章的 Dock 添加分割空位

使用 Mac 機的 OS X 作業系統時,我們通常會將常用的應用程式擺放在 Dock 上,方便隨時開啓。但隨著應用程式越來越多,Dock 也顯得雜亂無章。有沒有辦法能將不同類型的應用程式分割開呢?答案當然是有的。只須在 Dock 上添加個空位,十分簡單,不需要運行專業程式,直接使用 OS X 的終端機程式執行命令即可。


打開終端機(應用程式 > 工具程式),輸入以下命令:
defaults write com.apple.dock persistent-apps -array-add ‘{"tile-type"="spacer-tile";}’
每一次輸入並回車執行,Dock 則會新增一個空位。然後再輸入以下命令,重新啓動 Dock:
killall Dock

重新啓動後,Dock 左側部分即會多出個空位,你可將空位拖移到你想擺放的位置進行分割。以上命令只適用於 Dock 左側部分,如果你想在右側堆棧部分添加空位的話,則須輸入以下命令:
defaults write com.apple.dock persistent-others -array-add ‘{tile-data={}; tile-type="spacer-tile";}’
同樣再輸入以下命令重新啓動 Dock 執行:
killall Dock

用空位分割後的 Dock 是不是更舒適,也清晰明了呢?如果你想將 Dock 上的空位刪除,只需將空位拖移出去,它就會灰飛煙滅消失啦。

How Route between two different virtual networks in Hyper-V

When new internal network is created from “Virtual Network Manager”, new virtual “Local Area Connection X” is automatically created under “Control Panel > Network Connections”. We can use RRAS (routing and remote access) to route between virtual “Local Area Connection”.
  1. Open Hyper-V console
  2. Click on “Virtual Network Manager” under “Actions” Pane
  3. Enter Name, choose “Internal”, click “Add”, click “OK”
  4. You will noticed that new Local Area Connection is created under “Control Panel > Network Connections”
  5. Right click on the newly created Local Area Connection, choose properties.
  6. On TCP/IPv4 screen, enter IP: 10.1.0.1 , Subnet: 255.255.255.0 and no gateway. ( Repeat step 2 to 6 if you would like to create multiple networks )

  1. Open “Routing and Remote Access” console. ( Server Manager > Network Policy and Access > Routing and Remote Access)
  1. Right click on “Routing and Remote Access” and choose “Configure and Enable Routing and Remote Access”
  1. Choose “Custom Configuration”
  1. Choose “NAT” and “LAN routing”, click Next
    NAT allows your VMs to access the internet without exposing them.
    LAN routing allows you route between Local Area Connections
  1. Click Finish and Start the service.
  1. Browse to “NAT” under IPv4, Right click and choose “New Interface”, choose the interface that you use to connect to the internet.
  1. Choose “Public interface connected to the internet”, check “Enable NAT on this interface”, click OK
Now use 10.1.0.1 as the gateway on Hyper-V guest VM and you will be able to access the internet and to other subnets.
SCREENSHOTS
Hyper-V RRAS
Hyper-V RRAS
Hyper-V RRAS
Hyper-V RRAS
Hyper-V RRAS
Hyper-V RRAS

Hyper-V RRAS

Hyper-V RRAS
Hyper-V RRAS
Hyper-V RRAS
Hyper-V RRAS

Prevent or Prohibit Server Drives From Being Visible to Users

  To make changes to this policy for one of the seven default values: Start the Microsoft Management Console. On the Console menu, click  Ad...