2009-01-01から1年間の記事一覧

mode-infoで[emacs-info]へのリンクに飛べない問題

mode-info をいれて日本語の emacs や elisp の info を先日導入した。 結果、`describe-function' で search-forward 等の関数を検索すると日本語 info へのリンクが表示されるようになった。 クリックすると日本語の該当する info ノードに飛べるので便利…

iTerm で Command key をMETAキーとして使用するもう一つの方法

Emacsを使っているとShellのコマンドラインでもWord単位で移動する META-b とか META-f とか、C-y 後に META-y したくなったりする。 MacユーザーはCommandキーがoptionよりも押しやすいので、CommandキーをMETAキーとして使いたいとも思う訳だ。Leopardに元…

OSS クラウド

http://builder.japan.zdnet.com/sp/09-personal-cloud/story/0,3800097247,20394582,00.htmこれは気になる。ぜひやってみよう。

gem commands

* help gem -h gem environment gem help example gem help platforms gem help search * list up gem pack(first char is 'r') gem list r * inst/uninst/update gem insall rails gem update erubis gem uninsall sshexpect * search with :-d detail :-r …

JavaScripts interactive shell build

https://developer.mozilla.org/ja/Introduction_to_the_JavaScript_shell fc9 [0] /root # cat hoge.js function test() { var i = 3; print(i+2); } fc9 [0] /root # js -f hoge.js -f - js> test function test() { var i = 3; print(i + 2); } js> dis(t…

meaning of $1 in RPM SPEC file

RPM

http://www.vinelinux.org/manuals/making-rpm-9.htmlにあった内容を念の為確認。結果は正しい。 http://www.momonga-linux.org/~tamo/RPM-Tips_all.html とかには、 よく %post 等では $1 で条件を付けていますが、あの秘密を伝授しましょう。最初のインス…

これまでに購入したアプリ

アイテム番号 詳細 単価 1 "Wikiamo, v1.11, 販売業者: 智史 Nakagawa" 無料 2 " Flight Control, v1.1, 販売業者: ndWare Pty Ltd (4+)" \115 3 "タイピング〜, v1.2.1, 販売業者: 一哲 Takahashi (4+)" \115 4 "Air Sharing (Document Viewer, File Storag…

インスタンス変数やselfの理解整理

あいまいな理解だったので確認してみた。 1 #!/usr/local/bin/ruby 2 class Hoge 3 p self 4 p ancestors 5 @instantce_var1 = "A" 6 def initialize(a=self,b=Time.now) 7 @instantce_var1 = "B" 8 @instantce_var2 = "C" 9 p a 10 p self 11 puts b 12 end…

Refe.vimの操作

~/.vim/ftplugin/ruby.vim に下記二行を追加した前提で、nnoremap K :Refe nnoremap :Refe on ruby source key behave K カーソル下の単語をRefeで引く :Refe Refeでwordを引く Refeを開く on Refe buffer key behave o カーソル下の単語のリファレンスを見…

オブジェクトの凍結(freeze)、clone、dup の複製の深さの違い、eql? と equal? の違い

fc9 [0] /root # irb irb(main):001:0> self.class => Object irb(main):002:0> "str".freeze => "str" irb(main):003:0> a = "str" => "str" irb(main):004:0> a << "b" => "strb" irb(main):005:0> a.freeze => "strb" irb(main):006:0> a << "c" TypeErro…

[Ruby]トップレベルで定義されたメソッドはObjectに属するのでどこからでも呼べる。

#!/usr/local/bin/ruby p self.class def hello(target) puts "hello #{target}" end class Person hello("ryouichi") def hello2 hello("yurichan") end end hello("t9md") Person.new.hello2 実行結果 Object hello ryouichi hello t9md hello yurichan

無名クラスを定数に入れると定数の名前がクラス名になる。

c9 [0] /root # irb irb(main):001:0> var = Class.new => #<Class:0xb8094e40> irb(main):002:0> var.name => "" irb(main):003:0> Wibble = var => Wibble irb(main):004:0> var.name => "Wibble" irb(main):005:0> class Hoge ; end => nil irb(main):006:0> hoge = Hoge.ne</class:0xb8094e40>…

QuickSilverAlternative

http://www.lifeclever.com/scott-hanselman-10-quicksilver-alternatives-for-windows/

lambdaで作成したProcに名前をつける。

昨日から、プログラミングGauche作者: Kahuaプロジェクト,川合史朗出版社/メーカー: オライリージャパン発売日: 2008/03/14メディア: 大型本購入: 22人 クリック: 713回この商品を含むブログ (244件) を見るをやり始めた。 「lispの概念をしっかり身に着ける…

Gauche on vim

Emacsは使えないので(覚えたいけど。) vim syntax http://e.tir.jp/wiliki?vim%3Ascheme.vim wget http://e.tir.jp/wiliki?vim%3Ascheme.vim mv scheme.vim ~/.vim/syntax/ vim ~/.vim/ftdetect/scheme.vim autocmd FileType scheme :let is_gauche=1 gosh w…

HTTP_GETのヘルスチェック

LVS

digestに設定するmd5値はgenhashを使う。 status_codeとの併用は不可。status_codeが設定されている場合はdigestが無視されるぽい。 [root@centos5-01 ~]# genhash -s 192.168.207.5 -p 80 -u /alive.html -h genhash v1.0.0 (18/11, 2002) Usage: genhash -…

irb = interactive Ruby

fc9 [1] /root # irb irb(main):002:0> def add(x,y) x+y end => nil irb(main):003:0> def mul(x,y) x*y end => nil irb(main):004:0> add(2,3) => 5 irb(main):005:0> mul(2,3) => 6 irb(main):006:0> irb(main):012:0> calc=lambda { |x| send(x,2,3) } #…

gosh = interactive Gauche

fc9 [0] /root # gosh gosh> (define (add x y)(+ x y)) add gosh> (define (mul x y)(* x y)) mul gosh> (add 2 3) 5 gosh> (mul 2 3) 6 gosh> (define (calc f)(f 2 3)) ;関数を引数にとるcalcを定義 calc gosh> (calc add) ; 関数addを渡す => (add 2 3) …

フォント重要

http://wiki.fdiary.net/font/?freefont http://ja.wikipedia.org/wiki/ClearType http://labs.unoh.net/2007/08/post_95.html http://blog.goo.ne.jp/tooki5/e/d53c896578d05f146899186ef4e55b47

携帯キャリアIP判別材料

http://search.cpan.org/dist/Net-CIDR-MobileJP/ http://d.hatena.ne.jp/spiritloose/20061010/1160471510 http://dsas.blog.klab.org/archives/51117561.html

Bash Lesson

class Bar include Foo end class Baz < Bar p ancestors p included_modules p superclass end [root@fc9 bash]# mkdir -p a/{lib,src,doc/{html,pdf,txt}}/{s_a,s_b} [root@fc9 bash]# ls a [root@fc9 bash]# find ./ ./ ./a ./a/doc ./a/doc/txt ./a/doc/…

shortcut to be experienced programmer in 2years

HTML help http://d.hatena.ne.jp/onishi/20060512#p1 http://code.google.com/p/htmlhelp/downloads/list?q=label:CHM IDE IDE比較@wikipedia http://en.wikipedia.org/wiki/List_of_integrated_development_environmentsIDEリスト@zdnet http://japan.zdne…

PCI video card

http://www.pasocomclub.co.jp/htmls/4988755114509.html

adding apache module after installation

fc9 [0] /usr/local/src/httpd-2.2.11/modules/generators # /usr/local/apache-2.2.11/bin/apxs -c mod_info.c fc9 [0] /usr/local/src/httpd-2.2.11/modules/generators # /usr/local/apache-2.2.11/bin/apxs -i -a -n info mod_info.la