You are viewing dingyichen

Definite's Extractor
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 20 most recent journal entries recorded in dingyichen's LiveJournal:

    [ << Previous 20 ]
    Wednesday, October 12th, 2011
    5:08 pm
    看來得搬 blog 了
    livejournal 廣告、SPAM 太多了,看來真的得考慮搬家了。
    Wednesday, September 21st, 2011
    10:55 am
    irc.freenode.net: #fedora-unregistered
    I was fed up that I always be redirected to #fedora-unregistered instead of #fedora, even I have already registered the nickname.

    Today I found: What is the difference between NickServ Password and Server Password in X-Chat, then use Server password instead. Finally it works!

    Current Mood: satisfied
    Tuesday, September 20th, 2011
    5:39 pm
    cmake-fedora 0.8.1 released

    What has changed:



    • Fixed Bug 738958 - cmake-fedora: remove excessive quotation marks for Precompile definition

    • Fixed Bug 733540 - cmake-fedora: "" should be read as empty string

    • ManageEnvironment: Now defined cmake_policy won't get overridden.

    • ManageString: STRING_UNQUOTE is now merely remove quote marks in the beginning and end of string. The string will not be changed otherwise.

    • UseUninstall has renamed as ManageUninstall

    • ManageMaintainerTargets: Reveal MAINTAINER_UPLOAD_COMMAND

    • ManageTranslation: Adopt zanata python client 1.3, arguments are redesigned.


      • Change target: from "translations" to "gmo_files"

      • Add targets: zanata_push, zanata_push_trans, zanata_pull_trans

      • Add argument: ALL_FOR_PUSH, ALL_FOR_PUSH_TRANS and ALL_FOR_PULL

      • Add argument: OPTIONS for passing arguments.


    • ManageReleaseOnFedora: Now default to build against candidate repos,
      unless _CANDIDATE_PREFERRED is set to "0".

    Monday, August 8th, 2011
    12:47 pm
    Re: [真的很偏激] 承認吧台灣人,你和挪威殺人魔一樣都是種族歧視者。
    http://bone.twbbs.org.tw/blog/archives/2316
    學弟果然偏激。 :-P
    不過:

    1. Breivik 還同時稱讚其他國家,包括日本、南韓並打算與其「結盟」。其他諸國跟 Breivik 劃清界線那是人之常情。墳墓君居然把他拉成同類?這太矯情了吧。自我反省非常高尚,但自污不是。

    2. 世間事物皆有「度」。看人不順眼最多是惡不是罪,但是開槍打人就是罪。

    3. 移民子女不會自己的母語不用怪政府,該怪父母。我自己就是移民,所以這個我知道。只要父母是抱持著「融入主流社會,其他再說」,即使政府提供絕佳的母語學習課程,那也不會有用。

    Current Mood: angry
    Friday, July 22nd, 2011
    5:03 pm
    According to rpmlint, we Australian live in the future. :-)
    I recently ran into an interesting problem related to time zone.

    On 0:10, 18th July,
    I wrote my changelog as:
    * Mon Jul 18 2011 ......
    ....

    And then run rpmlint, which give me:
    <packageName>: E: changelog-time-in-future 2011-07-18

    Ok, we Australian live in the future, ..., at least for 8 hours (if you live in West Australia) each day.
    Friday, July 8th, 2011
    5:03 pm
    cmake-fedora 0.7.1 released!
    cmake-fedora 0.7.0 released!

    Well actually there are 0.6.1, 0.7.0 from last announcement, but 0.7.1 has less problem and more complete.
    Change from 0.6.0:


    • Even simpler release macros
    • Add debug level support.
    • Show proper error warning messages.
    • Show warning on unsatisfied optional dependencies, yet the normal build will still proceed.
    • Target "release" is fixed.
    • "After release" targets no longer be depended by target "release", instead, they are depended by "after_release".


    Note for distro other than Fedora and RHEL: you can turn off the missing dependency warning by giving -DMANAGE_MESSAGE_LEVEL=3, like:
    cmake -DMANAGE_MESSAGE_LEVEL=3 .
    
    Tuesday, July 5th, 2011
    3:38 pm
    Thinkpad is not as durable as before.
    I remembered a few years ago there was an AD that showed how durable the thinkpad was by pouring water on it and slam it on the ground.

    However, my personal experience shows otherwise, the first one is t60, after 1 year, the battery can only last 30 minutes, harddisk started making great voice, and sound card have broken sound.

    I obtained the second one, t510, last year and thing got worse. 'a' key was not very responsive after a few months usage, and the display area have broken into 3 pieces when my wife tried to pick the computer up.

    My latest one is still a t510, obtained 3 months ago. Well, 'i' key is not very responsive....
    Let's hope no other misfortune fell upon it.
    Friday, July 1st, 2011
    10:32 am
    Matching prefix pattern in Bash Parameter Expansion
    According to bash manpage, when doing parameter expansion like

    ${parameter#word}
    



    "The word is expanded to produce a pattern just as in pathname expansion."


    Indeed, the pathname expansion is glob expansion, however, unlike normal pathname expansion, the '*' actually matches '/'. In other words:

    PA=ja-JP/subdir/
    echo ${PA##ja*}
    

    outputs "",
    instead of "/subdir/",
    because ja* matches ja-JP/subdir/.

    So please treat * as if it is '.*' in regex.
    Friday, June 17th, 2011
    4:44 pm
    cmake-fedora 0.6.0 released!
    This version revises the macro about translation and add Zanata support!

    It also fixed the release_on_fedora target.

    See the RELEASE-NOTES.txt for detailed change.
    Wednesday, June 8th, 2011
    5:01 pm
    Comparing "Send to Kindle" and "Later on Kindle"
    I frequently visit sites that show source codes of programming language, so I compare the Send to Kindle and Later on Kindle, and see how they handle <pre> in this article.

    Well, I admit it's not a full scale test, so my test is bias.
    Anyway, according what I saw:


    • On document selection, source field: Send to Kindle shows the host name of the site, while later on kindle shows, well "lateronkindle@gmail.com"
    • For normal <pre> tag display:

      • On Send to Kindle every lines seem to be joined together, like:

      • On Later on Kindle: lines are split like:


    • For "tabled" <pre> tag display (last code block):

      • On Send to Kindle, still every lines joined together, yet all the content is displayed:

      • On Later on Kindle, lines are separated, but truncate at right margin, you can only rely on either rotate to landscape view or use smaller fonts and margins.




    To sum up, Later on Kindle generally better showing the pages with source code, but not good on long lines.
    Friday, June 3rd, 2011
    5:30 pm
    Use GMail in Google Chrome as default mail client in KDE and GNOME2
    Yes, I do have both boxes. I also got GNOME3, but I haven't tested the mail stuff yet.

    For KDE:


    System-Settings->Default Application->Email Client,
    Choose "Use a different email client" and the command line
    (From Gmail as the KDE default email client):
    
    
    /opt/google/chrome/google-chrome https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=%t&su=%s&%u
    


    For GNOME2:


    If you use nothing but default browser, simply install gnome-gmail (it's in Fedora).
    If not, thing is a bit harder, as Gnome only fill %s when it's stand-alone, (i.e. url %s is valid while url=%s isn't').

    So you need some small script (assume it's called gmail-chrome.sh) like:
    
    #!/bin/sh
    /opt/google/chrome/google-chrome "--app=https://mail.google.com/mail?extsrc=mailto&url=$1"
    


    Then go to System->Preference->Default application->Email Reader
    Choose "Custom" and the command line:
    
    /path/to/gmail-chrome.sh %s
    


    Use
    
    
    xdg-open "mailto:test@test?Subject=Hi"
    


    To see whether it work correctly.
    Monday, May 23rd, 2011
    5:02 pm
    BandRich BandLuxe C120 for Fedora 14
    When we were travel in Taiwan, my brother-in-law kindly lent me a BandLuxe C120 wireless broadband modem that used Vibo.

    The modem comes with Windows driver, and stated that it support Linux. However it's documentation is outdated (for Fedora 8). For example, the document says that the modem is mounted as CDROM, you can then umount it to access modem. But the cdrom icon did not appear after I inserted the modem.

    I've also tried usb_modeswitch and wvdial, but none of them actually works. But the first document give me an idea of sdparm.

    Finally, I installed sdparm and ran:

    sdparm --command=eject /dev/sr0
    


    Yay, I can see the wireless modem in NetworkManager.

    And my /etc/udev/rules.d/99-bandluxe.rules

    # send eject command via usb_storage driver for all BandLuxe Installation CDROM devices
    ACTION=="add" ATTR{idVendor}=="1a8d", ATTR{idProduct}=="1000", RUN="sdparm  /dev/$name"
    


    But please note that I did not revert all the settings I have done before.
    So you may still need to do some extra step for it to work.
    Friday, April 22nd, 2011
    6:07 pm
    Skype for Fedora 14 x86_64
    If you use the skype official rpm on Fedora14 x86_64, it will end up "command not found".

    Apparently it's dependency missing in spec file, so I just install qt.i686 and qt-x11.i686.

    It's still showing:
    skype: error while loading shared libraries: libXv.so.1: cannot open shared object file: No such file or directory

    and

    skype: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

    then I installed the missing dependency:
    yum install libXv.i686 libXScrnSaver.i686

    Summary:
    In Fedora 14 x86_64, you need
    yum -y install qt.i686 qt-x11.i686 libXv.i686 libXScrnSaver.i686
    Monday, April 18th, 2011
    10:53 pm
    African time VS American time
    If you see "American time" in Chinese literature or TV program (especially those from Taiwan, Mainland China does not seem use that as often), it does not mean "clock-bound pace of daily life in Western countries", quite contrary, it means relax, even time wasting on unimportant thing.

    For example, 「我才沒有這個美國時間去做那事。」
    Direct translation: I don't have "American time" to do that.
    Meaning: I don't want to waste my time on that.

    I am no etymologist, but I guess it's probably the TV or movie to blame. Why? Because in screen, American were either:

    1. Playing tennis or golf
    2. Playing with pet
    3. Surfing
    4. Lying on the beach
    5. Doing nothing but relax on luxury yacht

    Hard-working American? Well, we just didn't associate American with the concept Hard-working,
    only the Japanese, ourselves, and perhaps Germans deserved that title.

    So for me, it is very amusing to see African time, it fits, almost perfectly, our impression of western life style. :-)

    The moral of the story: everybody else are lazy, sloth and have more than sufficient time.

    Current Mood: amused
    9:56 pm
    Cheeky Grace
    Today I picked Grace from child care. When Grace saw me, "Mummy!" she called me.

    Not again. I pointed myself: "Daddy".
    Child care teacher said: "She knows. She is just cheeky.
    Tuesday, February 22nd, 2011
    3:06 pm
    精明的嘟嘟
    嘟嘟喜歡玩具熊,出門時總不忘記帶她的粉紅熊和白熊。
    幾天前帶嘟嘟和嘉嘉去醫院時,不小心把嘟嘟的白熊給弄掉了。

    嘟嘟回來之後哭著要白熊,沒辦法,只好去買隻新的。
    老婆大人下班回來,說是白熊太貴,給帶隻白兔。

    嘟嘟一看,哭得更大聲:雖說白熊白兔都姓白,可你也不能看我小,就拿白兔濫竽充數啊!

    老婆大人實在沒辦法,只好真的去買白熊。

    白熊買回來了,這下沒問題了吧?沒想到嘟嘟還來一記回馬槍:
    「我要原來那隻白熊,總共三隻熊!」
    Monday, January 17th, 2011
    5:08 pm
    [HOWTO][SSH] provide multiple identity files.
    Some development web site only allow one ssh public key, e.g. Fedora project.
    It is not a problem if you use exactly one computer to submit the task.

    However, if you do work on more than 2 computers then it might not work on the first glance.

    Of course, the most naive resolution is just use the same SSH public/private for all the computers. I am not a security expert, but it does not seem right to me, plus, you might want other k

    When digging in ssh_config man pages, it says:

    IdentityFile

    Specifies a file from which the user's RSA or DSA authentication identity is read. The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_rsa and ~/.ssh/id_dsa for protocol version 2. Additionally, any identities represented by the authentication agent will be used for authentication. ssh(1) will try to load certificate information from the filename obtained by appending -cert.pub to the path of a specified IdentityFile.



    The file name may use the tilde syntax to refer to a user's home directory or one of the following escape characters: ‘%d’ (local user's home directory), ‘%u’ (local user name), ‘%l’ (local host name), ‘%h’ (remote host name) or ‘%r’ (remote user name).

    It is possible to have multiple identity files specified in configuration files; all these identities will be tried in sequence.




    Thus, you can have a key pair, say, "id_rsa_fedora" and "id_rsa_fedora.pub" for signing fedora packages by writing your ~/.ssh/id_rsa_fedora like:
    IdentityFile=~/.ssh/id_rsa_fedora
    


    You do need to copy id_rsa_fedora to all you computers though.
    4:37 pm
    Strange comments.
    最近灌進來幾篇 comments 頗怪,說是廣告嗎,沒給 link,也沒標的物。
    說是純粹給我支持和鼓勵嘛,又挺像一個模板造出來的。

    為什麼我會這麼認為呢? 茲摘錄一段:
    I am impressed! Blog information posted here is quite my friend. I justified want to guess board up with comments and quality work. IE browser bookmarks to your blog ethical again, I l be involved a arise back to drive my friends more in the subsequent!

    猜猜看我是怎麼看出不對勁的?
    Friday, January 7th, 2011
    12:39 pm
    cmake-fedora-0.4.0 released!
    cmake-fedora is now released. The main improvements are:


    • New target: release: Do all release chores in one go.

    • New target: install_rpms: Convenient to install all rpms but SRPM and debuginfo

    • Issues related to backslash handling



    Hopeily I can keep releasing it bi-monthly. In the meantime, my ibus-chewing and ibus-table-chinese will be mended to use it once cmake-fedora f14 hits stable.

    Current Mood: energetic
    Wednesday, December 8th, 2010
    11:01 am
    ibus-table-chinese released!
    As title,
    已將版權有疑義的表拔除 (i.e. 鄭碼與自然碼)

    此外就是把原先的 ibus-table-wubi更名為 ibus-table-chinese-wubi-jidian,(極點五筆),因為那個表應該是極點五筆的表)。
    並增加 海峰五筆 (ibus-table-chinese-wubi-haifeng)、行列30以及行列30大字集。

    感謝 海峰兄將海峰五筆以 BSD 發行,
    dgod 兄將永碼以GPLv3發行。
[ << Previous 20 ]
My Website   About LiveJournal.com