January 16, 2009

安裝 git 跟 git svn

想來試試看 git,沒想到從安裝就不斷的遇到困難,記錄一下,下面都是用 git svn 抓某份有 16xxx 版的 source 來測試。

  • Windows(2000) 上 cygwin 有 git 可以直接裝,另外要裝 subversion-perl
    • 遇到中文檔名出問題,導致 clone 不成功
    • 速度很慢,原因不明
      (我都要放著抓一整天才能抓完,然後第一次抓不小心重開機,結果就沒看到因為中文檔名導致clone失敗的訊息,隔天整天搞不懂為什麼不能用弄了好久 -____-)
  • 在工作的unix server上用一般使用者的身分安裝
    • 裝 subversion (要裝apr, apr-util, neon)
    • 參考了這個網址裝 svn 的 perl module,寫下來以防網站消失
      (這個步驟也搞了好久,網路上有很多說明,可是我都試不出來... )
      在 svn source 的目錄
      make swig-pl
      make check-swig-pl
      sudo make install-swig-pl
      (把東西搬到 SVN/*.pm 跟 auto/SVN/_*/*.so *.bs 搬到特定位置去,那天弄到這邊已經完全失去耐心,用暴力解決 =_=)
總之就是... 可以開始用了 ~_~

December 25, 2008

Unix 指令 memo

  • man -f KEYWORD
    印出簡單的 man page 描述

  • nm -C objfile
    將 symbol name 轉回人看的懂(...)的樣子
--
年紀大了 T_T

December 23, 2008

[日劇]流星之絆

應該是無雷心得吧。

剛開始看覺得實在是太奇妙的劇本了,理論上是哀傷的基調,不知不覺氣氛忽然超歡樂,一瞬間又變得很認真。雖然隨著劇情演進,到後面愈來愈嚴肅了,可是看到最後,很清楚的感覺到小說絕對不會是這麼明亮的結局,不禁有些感謝(?)起編劇來。

最後三兄妹面對兇手那一段,清楚感受到在場的人都承受著很大的痛苦。以為挖掘出真相可以讓自己從受害者的身份中解脫,或者是以為可以補償什麼,卻因為自己的懦弱更深刻的傷害了對方。受害者、警察甚至是無關的旁觀者都想明白究竟是怎麼回事,而真實卻出乎意料的殘酷。

這樣緊繃的情緒卻在無厘頭的... 番外篇裡面被化解掉了。只能說有時候換個角度切入,世界就變的不一樣了啊。(爆)

December 15, 2008

vim的搜尋取代

參考B大的文章,把每次都會忘記的部份簡單記起來。

要搜尋的字串用 \(PATTERN\) 包起來,用\1,\2,...表示match到的pattern。

  • 貼上yank的字串 - Ctrl-R + 0(數字0)
  • 貼上前一次用 / 作 search 的字串 - Ctrl-R + /
-
我果然還是太菜了啊 ><

December 09, 2008

recursive 的對 .h 和 .cpp 作 grep

一直都不會,通常都是用 grep -r PATTERN * | grep cpp :X,今天被問所以認真的查了一下...

  1. find DIRECTORY -name '*h' -o -name '*cpp' | xargs grep PATTERN
  2. grep -r --include '*.h' --include '*cpp' PATTERN * (或DIRECTORY)
以後就會了 =_=

Edit: 2009/4/20

alias mygrep 'grep -n -r --include "*.h" --include "*.cpp" \!* *'
之後打 mygrep PATTERN 就好了 =_=

December 01, 2008

亂講話

嗯,有的時候也不知道是吃錯什麼藥了。

覺得有點討厭,是非只因多開口就是這樣吧,還是少講話比較好。 :/

November 08, 2008

linux 開機不會跑 rc.local

* runlevel
* under rc{runlevel}.d/, make symbolic link(S99local) to rc.local

November 07, 2008

Bang! 11/7

兩輪都是Outlaw,第一輪能力卡是Pixie Pete,沒有什麼問題,第二輪是Slab the Killer,有一些不確定的 :p

Q2. How can a player with a Barrel in play avoid a shot from Slab the Killer?
A. First of all, he has to “draw!”: if he doesn’t reveals a Heart card, he must play two Missed! Cards in order to avoid the shot, otherwise, he will need only one Missed! card. He cannot “draw!” two times.

Barrel 的用法,好像沒有硬性規定 http://bang.cz/phpbb2/viewtopic.php?t=423&highlight=barrel

然後關於Molly Stark (Each time she uses a card from her hand out of turn, she draws a card.),其實是不在他的回合的時候只要她用了一張卡就可以抽一張!終於懂了 XD

所以血是要算到負的才對的樣子
D9. If Tequila Joe is killed and he has a Beer in hand, how many life points he gains?
R. If Tequila Joe suffers one life point only, it goes to 2 life points. However, if he is being eliminated by means of a Dynamite, you have to sum up all lost life points and gained life points to see if (and how) he survives. For example, if he was at 1 life point and the Dynamite explodes,
Tequila Joe would go to -2 life points, so he will need two Beer cards to save his life (in this
case, he will go to -2 + 4 = 2 life points).

Bang! 規則備忘

每次玩都有些不太確定的規則,所以就玩完以後查一下 FAQ 然後貼上來備忘,反正也沒文章 :p

FAQ 網址: http://www.bang.cz/phpbb2/viewtopic.php?t=120
討論區網址: http://bang.cz/phpbb2/index.php
wikipedia (有牌名跟說明): http://en.wikipedia.org/wiki/Bang!

發現還有這個規則 (from wikipedia)
Any player eliminating an Outlaw (even if the eliminating player is himself an Outlaw!) must draw a reward of 3 cards from the deck.

Jail要一直等到抽到紅心才能逃獄
Some cards require a "draw!": this means that you have to reveal the first card of the deck and check the card suit and value shown on the lower left corner. For example, you may escape from the Jail only if you successfully "draw!" a Heart card.

October 19, 2008

碎碎念

最近常有種愈來愈懶得認真說任何事情的感覺。

沒有興趣說服別人什麼,認真的討論又要花去很多時間,加上對方或許沒有興趣聽,最後就變成隨便用些簡單的理由帶過去就好。

試圖把自己的想法加諸別人身上是種傲慢,認為別人不想理解所以懶的解釋應該也是另外一種傲慢吧。

所以普萊德才是個小孩造型嗎?(誤)