Blog

  • Markdown in Notepad++ with Perl/Cygwin

    Notepad++ is my primary text editor in Windows and I also have Perl installed in Cygwin.
    To Markdown files under Notepad++ with NppExec plugin, I use following scripts:

    A bash shell script to call Markdown.pl:
    [sourcecode language=”bash”]
    #!/bin/bash
    #c:\cygwin\bin\bash.exe -l "/cygdrive/c/cygwin/home/$USER/Markdown.sh" "$(FULL_CURRENT_PATH)" $(CURRENT_DIRECTORY) $(NAME_PART)
    current_path=cygpath -u $1
    current_dir=cygpath -u $2
    out_file=$current_dir/$3.html
    echo "Markdowning file: "$current_path
    ~/Markdown_1.0.1/Markdown.pl "$current_path" > "$out_file"
    echo "Result file: "$out_file[/sourcecode]

    The NppExec script:
    [sourcecode]
    c:\cygwin\bin\bash.exe -l "/cygdrive/c/cygwin/home/$(SYS.USERNAME)/Markdown.sh" "$(FULL_CURRENT_PATH)" "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
    NPP_OPEN $(CURRENT_DIRECTORY)\$(NAME_PART).html
    [/sourcecode]

    The HTML will be opened in Notepad++. I didn’t try to find a way to open it in browser directly yet.

    Reference post: “Markdown in Notepad++

  • 西遊·降魔篇

    英文片名:Journey to the West: Conquering the Demons
    IMDb: Xi You Xiang Mo Pian (2013)

    周星馳的電影就是周星馳的電影,有自己的套路風格,看了幾部他的電影後會開始問:「就只有這樣?」回歸娛樂方面,還是可以給幾顆星。

    最後孫悟空動畫抄什麼我不清楚,不過看到漫畫七龍珠的賽亞人橋段我笑很大聲就是,最後悟空也去了界王神的小星球啊~

  • 轉生術

    英文片名:Painted Skin: The Resurrection
    IMDb: Painted Skin: The Resurrection (2012)

    其實這是電影《畫皮》第二集,台灣大概是第一集賣不好所以第二集不叫《畫皮 II》。女性朋友大概會比較喜歡,男性朋友大概就看特效吧?歐~費翔伯伯的角色也很挺有趣的…

  • Remove unused Linux kernel related packages

    There is a very simple command:

    [sourcecode language=”bash”]dpkg -l ‘linux-‘ | sed ‘/^ii/!d;/’"$(uname -r | sed "s/(.)-([^0-9]+)/\1/")"’/d;s/^[^ ]* [^ ]* ([^ ])./\1/;/[0-9]/!d’ | xargs sudo apt-get -y purge[/sourcecode]

    From “Ubuntu Cleanup: How to Remove All Unused Linux Kernel Headers, Images and Modules

  • Flight of the Phoenix

    中文片名:鳳凰號
    IMDb: Flight of the Phoenix (2004)

    好多天前在電影台重溫一次,查 IMDb 才發現原來是老片重拍。好一陣子沒有更新 blog,上來除個草…哈!