WDF

GNU screen の使い方

Terminalでの作業が多くなってきたのでscreenを使ってみる。


.screenrc ファイル

defencoding utf8
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w"
escape ^z^z
startup_message off
autodetach on


新規仮想画面の追加
^z c

次の仮想画面への移動
^z n

前の仮想画面への移動
^z p

指定番号の仮想画面に移動
^z [0-9]

仮想画面のタイトルを変更
^z A

バックスクロール(コピーモード)モードに移行
^z [ESC]

バックスクロール(コピーモード)を抜ける
[ESC]

コピー
コピーモードに入り(^z [ESC])
[SPC]
もう一度[SPC]でバッファに保存される

ペースト
^z ]

デタッチ
^z d

セッションリストの確認
screen -ls

アタッチ
screen -r {プロセス番号}

ウィンドウ分割
^z S

ウィンドウ移動
^z [TAB]

ウィンドウ削除
^z X

現在のウィンドウのみ
^z Q

ThinkPad X60 無線LAN設定 (Feisty Fawn)

XPのドライバファイル net5416.cat net5416.inf ar5416.sys を用意する。

ndiswrapper のインストール

$ sudo aptitude install ndiswrapper-utils-1.9 ndiswrapper-source
$ sudo m-a prepare
$ sudo m-a a-i ndiswrapper

XPのドライバファイルのインストール

$ sudo ndiswrapper -i net5416.inf
$ sudo ndiswrapper -l
net5416 : driver installed
        device (168C:0024) present

ndiswrapper モジュールのロード

$ sudo modprobe ndiswrapper

無線lanインターフェースの確認

$ ifconfig -a | grep wlan0
wlan0     Link encap:Ethernet  HWaddr ...

network-manager で無線設定をする。

OS起動時にndiswrapperをロードするように設定する。

$ sudo ndiswrapper -m

/etc/modules に ndiswrapper を追加する。

/etc/pam.d/gdm に以下の行を追加する。(キーリングパスワードをログインパスワードと同一にする)

## Added so that NetworkManager doesn't keep asking for Keyring password.
## relies on having same password to keyring as login password.
auth optional pam_keyring.so try_first_pass
session optional pam_keyring.so

起動時間の短縮のため /etc/network/interfaces を一部コメントアウトする。

auto lo
iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp

#auto eth1
#iface eth1 inet dhcp

#auto eth2
#iface eth2 inet dhcp

#auto ath0
#iface ath0 inet dhcp

#auto wlan0
#iface wlan0 inet dhcp

参考サイト
http://robotics.naist.jp/~min-d/p/index.php?wireless%20LAN
http://blog.livedoor.jp/ponkan_uma/archives/53760535.html
http://ubuntuforums.org/showthread.php?t=316927

ページのはてなブックマーク数を表示する

表示中のページのはてなブックマーク数をレイヤー上に表示します。
ブックマーク数の画像をクリックすると、はてなブックマークのページを開きます。
レイヤーをダブルクリックすると消えます。

javascript:(function(){var href = document.location.href;var uri_bookmarkcount_img = 'http://b.hatena.ne.jp/bc/' + href;var uri_bookmarkcount_anc = 'http://b.hatena.ne.jp/entrylist?url=' + href;var uri_entry_img = 'http://b.hatena.ne.jp/entry/image/' + href;var uri_entry_anc = 'http://b.hatena.ne.jp/entry/' + href;var id = 'wdfhatenabookmarkcount';if (!document.getElementById(id)) {var elem = document.createElement('DIV');elem.setAttribute('style', 'position:fixed;padding:10px;top:20px;left:20px;z-index:100;cursor:pointer;-moz-opacity:0.9;background-color:#fff;border:1px solid gray;');elem.setAttribute('ondblclick', 'document.body.removeChild(this);');elem.innerHTML = '<div><a href=%22' + uri_bookmarkcount_anc + '%22 target=%22_blank%22><img src=%22' + uri_bookmarkcount_img + '%22 border=%220%22></a></div>' +'<div><a href=%22' + uri_entry_anc + '%22 target=%22_blank%22><img src=%22' + uri_entry_img + '%22 border=%220%22></a></div>';document.body.appendChild(elem);}})();

日本語入力にuimを利用する

$ sudo aptitude install uim uim-xim uim-anthy

/etc/X11/xinit/xinput.d/uim を編集する。

GTK_IM_MODULE=uim
QT_IM_MODULE=uim
XMODIFIERS=@im=uim
XIM_PROGRAM_XTRA=uim-toolbar-gtk-systray

uimを入力メソッドに指定する。

$ sudo update-alternatives --config xinput-ja_JP