近況などを、っても何も変わってないけど。
ああ、諸事情により、家ではネットワーク難民になりますた。予定では2月ぐらいに復活する予定。
後なんかあるかな…。ないかな。
September 21, 2007
July 26, 2007
host clock rate change request
kernel: /dev/vmmon[xxxx]: host clock rate change request yyyy -> zzzz
みたいなログがわんさかでてどうしたものかと思ってたが、解決方法を見つけたのでメモ。
kernel configを
でkernelをbuildするか、.vmxファイルにCONFIG_HZ_1000=y
CONFIG_HZ=1000
を追加することで収まる。CONFIG_HZ=1000は未確認。sidの吊るしkernel 2.6.22-1で確認。ソースはこちらhost.useFastclock = FALSE
diredでgを押さずにbufferを更新
若干誇張しすぎてる気もするけど、とりあえずgを押せと言われるシチュエーションに於いてgを押さずに勝手に更新してもらう方法。
(defadvice dired-noselect (after my-dired-noselect (dir-or-list &optional switches) activate)
(if (dired-directory-changed-p dir-or-list)
(with-current-buffer ad-return-value
(let ((pos (point))
(current-file (dired-get-filename)))
(revert-buffer)
(unless (dired-goto-file current-file)
(goto-char pos))
(message "Dired buffer `%s' has been updated." dir-or-list)))))
July 23, 2007
ghostscript 8.60とromfs
最 近のgsは%rom%lib/とかsearch pathに追加されてんのね。いくら/usr/share/ghostscriptの下のファイルを変更しても反映されんのでしばらく悩んだ。build 時に必要なファイルすべてmkromfsを経由してgsromfs.cとして変換され、それをlibgsの中に組み込んでしまうようだ。
まあそれはそれでありだと思うけど、それなら/usr/share/ghostscriptとか持つ必要ないよね。混乱するだけ。
July 10, 2007
rieceからsshのトンネルを掘る
環境の都合上clientからIRC proxyまでの経路をsshでトンネルを掘っている。これを裏でshell scriptを使って接続していたんだけど、めんどいので、riece動かした時になんとかしてみようと思った。
というわけで以下結果。
(eval-after-load "riece"16667でlistenしてるのがなければsshでport forwarding、繋がるまでラグがあるので、set-process-filterで何か飛んでくるのを待ってからhookから抜けるようにしてみた。
'(progn
(defun irc-ssh-tunnel-negotiates-connection (process event)
(message "ssh tunnel established")
(set-process-filter process nil)
(setq irc-ssh-tunnel-negotiating nil))
(defun make-tunnel (irc-ssh-user irc-ssh-server)
(setq irc-ssh-tunnel-negotiating t)
(if (condition-case nil
(let* ((buf (generate-new-buffer " *irc-tunnel*"))
(process (open-network-stream
"irc-tunnel"
buf
"localhost"
16667)))
(delete-process process)
(kill-buffer buf)
nil)
(error t))
(progn
(setq process
(start-process "irc-ssh"
nil
"ssh"
(concat irc-ssh-user "@" irc-ssh-server) "-C"
"-L 16667:localhost:16667"))
(set-process-filter process 'irc-ssh-tunnel-negotiates-connection)
(while irc-ssh-tunnel-negotiating
(sit-for 0.1)))))
(add-hook 'riece-after-load-startup-hook
'(make-tunnel "user" "host"))))
Subscribe to:
Posts (Atom)