嘸蝦米 加字加詞檔

BQ; <blockquote><cite></cite></blockquote>
BR; <br />
CODE; <code></code>
HR; <hr />
MORE; <!--more-->
I; 愛妳啾^3^
IMG; <img src="" />
P; <p></p>
REF; <ref></ref>
SEP; <div class="sep">我是分隔線</div>
SPF; &nbsp;&nbsp;&nbsp;&nbsp;
SPAN; <span></span>

FDZ Direct External Link

// ==UserScript==
// @name           FDZ Direct External Link
// @description    FDZ Direct External Link
// @run-at document-end
// @include        http://forum.fdzone.org/viewthread.php?tid=*
// @include        http://forum.*.fdzone.org/viewthread.php?tid=*
// ==/UserScript==
var links=document.querySelectorAll("a[href*='j.php?u']");
for(var i=0;i<links.length;i++)
    links[i].href=decodeURIComponent(links[i].href.replace(/.*j.php\?u=/,''));

滑鼠左右鍵切換視窗

~LButton & RButton::AltTab

快速複製PasteCopy.NET全部清單

快速複製PasteCopy.NET全部清單
加速整理Wretch相簿連結 XD
editor.OpenFile("D:\\軟體\\PasteCopy\\Clipboard.txt",eeEncodingUTF8,eeOpenAllowNewWindow);
document.selection.Replace("^(Nt,)","",eeFindNext | eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("R\\+,新類別\\n","",eeFindNext | eeReplaceAll | eeFindReplaceRegExp);
document.selection.Replace("(http://.*)$\\n","<a target=\"blank\" href=\"\\1\">\\1</a><br />\\n",eeFindNext | eeReplaceAll | eeFindReplaceRegExp);
document.selection.SelectAll();
document.selection.Copy(eeCopyUnicode);
document.close();
  1. 開啟ClipBoard.txt
  2. RegExp取代^(Nt,)
  3. RegExp取代R\+,新類別\n
  4. 把網址替換成超連結>
  5. 全選
  6. 複製
  7. 關閉檔案

EmEditor Help: Macro Reference

查詢硬碟剩餘空間(using WinAPI)

using System.Runtime.InteropServices;
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
    [return: MarshalAs(UnmanagedType.Bool)]
    static extern bool GetDiskFreeSpaceEx(string lpDirectoryName,
    out ulong lpFreeBytesAvailable,
    out ulong lpTotalNumberOfBytes,
    out ulong lpTotalNumberOfFreeBytes);

string drive = "D:\\";      // 要查詢剩餘空間的磁碟
ulong FreeBytesAvailable;
ulong TotalNumberOfBytes;
ulong TotalNumberOfFreeBytes;
bool success = GetDiskFreeSpaceEx(drive, out FreeBytesAvailable, out TotalNumberOfBytes, out TotalNumberOfFreeBytes);

if (!success)    throw new System.ComponentModel.Win32Exception();

double free_kilobytes = (double)(Int64)TotalNumberOfFreeBytes / 1024.0;
double free_megabytes = free_kilobytes / 1024.0;
double free_gigabytes = free_megabytes / 1024.0;

//取得Server IP
System.Net.IPAddress sever_ip = new System.Net.IPAddress(System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName()).AddressList[0].Address);
Response.Write(sever_ip.ToString() + " 剩餘 " + free_gigabytes.ToString("0.00") + " GB");

[C#]查詢硬碟剩餘空間(透過WinAPI) - .NET菜鳥自救會- 點部落
C# 如何取得本機(Server)的IP @ R~福氣拉! :: 隨意窩 Xuite日誌

Firefox tete009 PGO 安裝流程

雖然步驟很簡單,但是還是筆記一下,免得老來失憶。

  1. 先到tete009官網下載最新版的Firefox和Module binder for Private Build
  2. 上述兩樣檔案,都解壓縮至目前Firefox所安裝的資料夾
  3. 執行tbind.exe(依照你的系統環境優化模組)
  4. 第一次執行後,安裝Language packs
  5. 網址列輸入about:config
  6. Filter欄位輸入general.useragent.locale,修改語系成zh-TW
  7. 重新啟動Firefox
  8. 收工

Software - Tete's Atelier
Firefox想要更快?升級PGO+CPU指令集加速版 :: 綠色工廠 Easylife Blog

Rebinding events in jQuery after Ajax update (updatepanel)

function pageLoad(sender, args) {
    if (args.get_isPartialLoad()) {
        //Do something what you want.
    }
}

asp.net - Rebinding events in jQuery after Ajax update (updatepanel) - Stack Overflow

[FireGestures] Browser Position

使用寬螢幕(1920 x 1280)時,快速切換Browser位置至左、中、右,寬度為1280,高度為screen.availHeight

FireGestures.BrowserPosition = function (x) {
    window.resizeTo(1280, screen.availHeight);
    window.screenX = x;
    window.screenY = 0;
};
FireGestures.generatePopup(event,
    [
        { label: "Left" ,oncommand: "this.BrowserPosition(0);" },
        { label: "Center" ,oncommand: "this.BrowserPosition((screen.width - 1280)/2);" },
        { label: "Right" ,oncommand: "this.BrowserPosition(screen.width-1280);" }
    ]
);

FireGestures :: Make Scripts
FireGestures :: Get Scripts -> [Popup] Resize Window

[FireGestures] Copy Page URL to Clipboard (CLS URL)

改寫官方提供的Copy Page Title and URL to Clipboard,並加入多餘參數清除功能,方便貼在MSN
目前支援:
  • Youtube
  • RSS Source
  • Mobile01
  • Mobile01 貼圖區

const AS_HTML = true;

function htmlEscape(s) {
  s = s.replace(/&/g, "&amp;");
  s = s.replace(/>/g, "&gt;");
  s = s.replace(/</g, "&lt;");
  s = s.replace(/"/g, "&quot;");
  return s;
}
var l=window.content.location, tmp=l.href;
if(/(\?|&)utm_source.*/.test(tmp)) tmp=tmp.replace(/(\?|&)utm_source.*/i,'');
if((l.href.indexOf('youtube.com')!=-1) && (/(v=.{11})/.test(l.search))) tmp='http://www.youtube.com/watch'+l.search.replace(/.*(v=.{11}).*/i,'?$1');
if(/www\.mobile01\.com/.test(tmp)) tmp=tmp.replace(/&last=.*/,'');
if(/www\.mobile01\.com/.test(tmp) && /gallerydetail\.php/.test(tmp)) tmp=tmp.replace(/&fp=(\d{1})/,'');
var title = window.content.document.title;
var txt = AS_HTML ? '<a href="' + htmlEscape(tmp) + '">' + htmlEscape(title) + '</a>' : title + "\n" + tmp;
var clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
clipboard.copyString(txt);

FireGestures :: Get Scripts
相關文章:
delicious URL Clean

delicious URL Clean

加入delicious時,自動清除Youtube、Mobile01、RSS Source多餘參數

// ==UserScript==
// @name           delicious URL Clean
// @description    delicious URL Clean
// @author    NKid
// @version    2012-06-08
// @run-at document-end
// @include        http://delicious.com/save?url=*
// ==/UserScript==
var argUrl=/url=(.*)&title/.exec(decodeURIComponent(location.search))[1], tmp;
if(argUrl.indexOf('utm_source')!=-1){
    tmp=argUrl.replace(/(\?|&)utm_source.*/i,'');
}
else if((argUrl.indexOf('youtube.com')!=-1) && (/(feature|hd|NR|playnext|list|p)=.*?/.test(argUrl))){
    tmp='http://www.youtube.com/watch?' + argUrl.replace(/.*(v=.{11}).*/i,'$1');
}
else if(/www\.mobile01\.com/.test(argUrl) && /&fp=/.test(argUrl)) {
    tmp=argUrl.replace(/&fp=(\d{1})/,'');
}
else if((argUrl.indexOf('mobile01.com')!=-1) && (/&last=/.test(argUrl))){
    tmp=argUrl.substring(0,argUrl.indexOf('&last'));
}
if(tmp.length != 0) location.assign(location.pathname+'?url='+encodeURIComponent(tmp)+'&title'+location.search.replace(/\?url.*?&title/,''));

相關文章:
[FireGestures] Copy Page URL to Clipboard (CLS URL)

Improve your jQuery - 25 excellent tips

  1. Load the framework from Google Code
  2. Use a cheat sheet
  3. Combine all your scripts and minify them
  4. Use Firebug's excellent console logging facilities
  5. Keep selection operations to a minimum by caching
  6. Keep DOM manipulation to a minimum
  7. Wrap everything in a single element when doing any kind of DOM insertion
  8. Use IDs instead of classes wherever possible
  9. Give your selectors a context
  10. Use chaining properly
  11. Learn to use animate properly
  12. Learn about event delegation
  13. Use classes to store state
  14. Even better, use jQuery's internal data() method to store state
  15. Write your own selectors
  16. Streamline your HTML and modify it once the page has loaded
  17. Lazy load content for speed and SEO benefits
  18. Use jQuery's utility functions
  19. Use noconflict to rename the jquery object when using other frameworks
  20. How to tell when images have loaded
  21. Always use the latest version
  22. How to check if an element exists
  23. Add a JS class to your HTML attribute
  24. Return 'false' to prevent default behaviour
  25. Shorthand for the ready event

Improve your jQuery - 25 excellent tips

Create Shortcut URL

簡化下載檔案時,常會使用的動作流程

;建立URL(Win + V)
#v::
if WinActive("ahk_class CabinetWClass")    ;Explorer才執行
{
    strlen:=StrLen(Clipboard)    ;取得剪貼簿字串長度
    if(strlen > 0)
    {
        URL=%Clipboard%    ;從剪貼簿取得URL
        Send !d    ;焦點移至網址列 Alt + D
        Send ^c    ;Ctrl + C
        ClipWait 1    ;等待OS 1秒
        Send +{Tab}    ;取消焦點
        FileAppend,[InternetShortcut]`nURL=%URL%`nIconFile=`nIconIndex=1,%Clipboard%\URL.url
    }
}
Return
;複製URL(Win + C)
#c::
if WinActive("ahk_class CabinetWClass")    ;Explorer才執行
{
    Send !{Enter}    ;開啟內容
    WinWaitActive, 內容, , 1
    Send ^c    ;Ctrl + C
    ClipWait 1    ;等待OS 1秒
    Send !{F4}    ;關閉內容
}
Return
;反向選取(Win + A)
#a::
if WinActive("ahk_class CabinetWClass")    ;Explorer才執行
{
    Send {Alt}
    Send e
    Send i
}
Return
;滑鼠左右鍵切換視窗
~LButton & RButton::AltTab
;關閉主程式(Win + X)
#x::
ExitApp