subversion 與 file:// protocol

在 Windows 上,想偷懶不架設 svn server 或 http server 的話,可以這麼作。
首先你得安裝TortoiseSVN。
然後建立 repository,TortoiseSVN的方法是這樣子的:

  1. 先建立一個空目錄
  2. 再該目錄上按下滑鼠右鍵,選 TortoiseSVN > create repository here

建立成功之後,緊接著,再按下滑鼠右鍵,將這個目錄分享出來。
之後,到你的工作目錄,用TortoiseSVN去 check out
URL of repository 就打 file:////your_computer/your_share 即可。

Make Link 與 Digg This!

不知道裝了什麼 Addon 之後,Make Link得到的結果就錯了,每次要取頁面標題或是選取文字時,都會得到 “[object Object]”。
經過一番奮戰之後,終於發現 Make Link 與 Digg This! 都個別定義了 getSelectedText() 這個函數,Make Link因為呼叫到Digg This!的getSelectedText(),所以判斷的時候,就出錯,而得到 “[object Object]”。
所以只要移除掉Digg This!這個 Addon 之後就好了。
或者,你也可以自行為某 Addon 中的 getSelectedText() 作更名,再重新打包即可。

mod_rewrite

使用上很簡單,看mod_rewrite官方說明,應該就可以明白,要不也可以利用Google找到很多教學(關鍵字:mod_rewrite tutorial)。
要特別注意的一點,得記得把該目錄的 AllowOverride 設置為 All (Apache設定檔裡面)。
如果是 None 的話,mod_rewrite 不會生效。
像我的CentOS預設就是把 /var/www/html 的 AllowOverride 設置為 None,所以得去編輯 /etc/httpd/conf/httpd.conf ,找到 <Directory “/var/www/html”> … </Directory> 裡面的 AllowOverride,改為 All,再重新啟動 httpd 即可。

IE7的”Open in new Tab” 消失了

安裝 IE7 正式版以後,發現一個問題,滑鼠右鍵點選連結時,應該要出現 “Open in new Tab” 的,可是卻消失了。
我納悶了很久,不知道該怎麼解決。
某天因緣際會之下,看到了這篇文章:IE7 Tabbed Browsing Q & A ,作者說如果有任何關於 Tab browsing 疑問的話,請儘管留言,他會努力解決,於是我留下問題。
過了許久,等我想起這件事情的時候,再次回來看這篇文章,發現作者已經很詳細的回答了我的問題。

@elleryq, most likely you have an add-on that decided to override IDocHostUIHandler in order to provide a custom context menu. The fix is to look at your add-ons and upgrade or un-install them. Some, such as the Google toolbar, have fixed this in the newest versions.
To provide more detail, the problem is that they’re loading the IE6 version of the context menu out of shdoclc.dll, which is no longer part of IE, but is still part of Windows Explorer. There was some bad documentation on our part (well, legacy) which suggested loading otherwise undocumented IE resources out of shdoclc.dll, which a handful of add-ons followed.
IDocHostUIHandler was primarily intended to be used by 3rd party browsers such as Maxthon, and not IE extensions. The recommended advice for 3rd party developers is to use standard context menu extensions whenever possible (see the “Context Menus and Extensions” section in http://msdn2.microsoft.com/en-us/library/aa770042.aspx) and if you really *have* to override IDocHostUIHandler, load your own resources for the context menus.
tonyschr

所以我照著他的建議,更新 Google toolbar 到最新版,問題就解決啦~

備份AD通訊錄

備份Active Directory上所有 user 的分機與 e-mail…
把下面的 code 存成 export.vbs以後,點擊兩下就可以執行了。

'Global variables
Dim oContainer
Dim OutPutFile
Dim FileSystem
'Initialize global variables
Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject")
Set OutPutFile = FileSystem.CreateTextFile("msi.csv", True)
Set oContainer=GetObject("LDAP://DC=test,DC=com")
'Enumerate Container
EnumerateUsers oContainer
'Clean up
OutPutFile.Close
Set FileSystem = Nothing
Set oContainer = Nothing
WScript.Echo "Finished"
WScript.Quit(0)
Sub EnumerateUsers(oCont)
On Error resume next
Dim oUser
For Each oUser In oCont
Select Case LCase(oUser.Class)
Case "user"
'If Not IsEmpty(oUser.distinguishedName) Then
'	OutPutFile.WriteLine "dn: " & oUser.distinguishedName
'End If
If Not IsEmpty(oUser.name) Then
OutPutFile.Write oUser.Get("name")
End If
OutPutFile.Write ","
If Not IsEmpty(oUser.FullName) Then
OutPutFile.Write oUser.FullName
End If
OutPutFile.Write ","
' EmailAddress
If Not IsEmpty(oUser.EmailAddress) Then
OutPutFile.Write oUser.EmailAddress
End If
OutPutFile.Write ","
If Not IsEmpty(oUser.TelephoneNumber) Then
OutputFile.Write oUser.Get("TelephoneNumber")
End If
OutPutFile.WriteLine
Case "organizationalunit" , "container"
EnumerateUsers oUser
End Select
Next
End Sub

參考資料:

FireFox 2.0 RC1

把公司的 FireFox 改用 2.0RC1,Extension 詳列如下:

  • 2.0 仍可使用者:
    • DOM Inspector
    • Talkback
    • Adblock Filterset.G Updater
    • CustomizeGoogle
    • IE Tab
    • Image Zoom
    • PDF Download
    • Web Developer
    • FlashGot
    • 新同文堂
    • Download Statusbar
    • Adblock Plus
    • ColorZilla
    • Google Toolbar for Firefox
    • Google Browser Sync
  • 不相容 2.x:
    • del.icio.us
    • Fasterfox
    • Hypertext DOM Browser
    • Furl Tools
    • Copy URL +
    • Greasemonkey
    • CSSViewer
    • Screen grab!
    • gmif
    • Tabbrowser Preferences

目前一切順利,不過少了一些如 del.icio.us、furl.net、Copy URL+等等的方便工具,還真是麻煩~

WinMerge Filter

無意中看到這篇:WinMerge檔案濾鏡的使用方法,於是動手幫WinMerge加了這個濾鏡,這下子,比對檔案的時候可是快多了!

怎麼新增?
[Tools][Filters],再選 New,WinMerge會開出記事本,把下面內容貼上,存檔。

怎麼使用?
比對時,Filter選為剛剛加入的 cpp_with_cvs 或是自己輸入 [F]cpp_with_cvs,進行compare 即可。

## This is a directory/file filter template for WinMerge
name: cpp_with_cvs
desc: For company usage.
## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
def: include
## Filters for filenames begin with f:
## Filters for directories begin with d:
## (Inline comments begin with " ##" and extend to the end of the line)
f: \.bak$              ## 備份檔
f: \\~*$               ## 備份檔
f: \\#*$               ## WinCVS 的備份檔
f: \.map$              ## .map, .rom, .axf 都是編譯的產出物
f: \.rom$
f: \.axf$
f: \ChangeLog$         ## ChangeLog 也不要
d: \\CVS$              ## CVS下的檔案不用比對
d: \\\.OBJ_RELEASE$    ## 這兩個都是編譯時的產出
d: \\\.OBJ_DEBUG$

Workaround

感謝前同事 Terry 同學的解釋,讓我搞懂了。
Workaround 的意思:對Bug 來說,並沒有fixed 但是有替代方案可以避開
Severity 是代表嚴重性,當選為 Workaround 的時候,表示這個 bug 並沒有真正 fix,但是有替代方案可以避開,嚴重性不高
No workaround 的話,表示目前沒有 fix,也沒有替代方案,嚴重性就比較高~