善用大容量記憶體

有時候使用windows工作管理員,看到記憶體還剩2GB未使用時,總覺得不能浪費,所以就拿來當作瀏覽器快取空間,而我使用的軟體是SoftPerfect RAM Disk,軟體設定就不再敘述,而產生出來的磁碟機代號為Z。

ie-cache(IE10)

  1. 在Z槽產生一個子目錄,名稱為ie-cache。
  2. 打開IE Browser -> 工作列 -> 網際網路選項。
  3. 選擇移動資料夾
  4. 指定快取目錄路徑


chrome-cache

  • 方法一:開啟chrome瀏覽器捷徑圖示的內容,並在目標欄位值中加入--disk-cache-dir="Z:\chrome-cache",記得與命令之間要有空格。

  • 方法二:如果方法一無作用,可在系統管理員輸入以下的指令,輸入前先刪除chrome預設cache目錄。
  • c:\>mklink /D "C:\Users\santanalee\AppData\Local\Google\Chrome\User Data\Default\Cache" "Z"\" 註:可以檔案總管路徑列中使用%appdata%。

    firefox-cache

    1. 開啟Firefox瀏覽器,在網址列輸入「about:config」再按下〔Enter〕。

    2. 任意空白處按一下滑鼠右鍵,再點選【新增】→【字串】。

    3. 輸入「browser.cache.disk.parent_directory」
    4. 輸入「Z:\firefox-cache」

    使用vim搜尋並取代含雙引號的網址字串

    替換(substitute)的表示式:
    :[range]s[ubstitute]/{pattern}/{string}/[flags]

    :1,$s#href=""#href="http://mywebsite/"#

    1,$:表示從頭到尾(也可以用%取代1,$)
    分隔符號(separator)為#(Pound sign)



    文章來源
    The "separator" (usually '/' or '#')
    The "separator" is a character which seperates the command name from the pattern, seperates the pattern from the substitution string, and the substitution string from the options. You can chose any(?) character as a separator, but usually the slash (/) is used. When substitutions contain the slash as a literal character you should chose some other character that is not contained in the pattern or substitutions string. And if this is not possible then you have to "escape" it with a backslash (\): ":s/\/path\/filename/\/newpath\/newfilename/"