aka:メモ
- mp4ファイルをdemuxして、音声ファイルを自由に取り扱えるようになりたい。
- graphviz、便利そう。
- emacsで日付間の日数を計算する
(require 'calendar) (defun aka:count-days-between (start end) "The format of START and END is (month day year)." (- (calendar-absolute-from-gregorian end) (calendar-absolute-from-gregorian start)))
- emacsでrandom stringを生成する
(require 'cl) (defun* aka:generate-random-string (length &key chars) (let* ((chars (if chars chars [?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z ?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T ?U ?V ?W ?X ?Y ?Z])) (number-of-chars (length chars)) (result (make-string length ?0))) (dotimes (i length result) (aset result i (aref chars (random number-of-chars)))))) ;; usage sample ;; (random t) ;; (aka:generate-random-string 10) ;; (aka:generate-random-string 10 :chars [?3 ?4])
- OSXでEmacs
- Carbon EmacsとvanillaなGNU Emacsがある。vanillaなGNU Emacsにした。Carbon Emacsはある程度モードが入っていて簡便だが、基本的には年一回のリリースであり、しかもそれは年初だ。なので、11月に導入する場合、いかんせん諸々古い。
- OSXでEmacsを多少まじめにつかってみようと思い、Mewをインストールしたらstunnelが無いからimap/sslでつなげない、となった。OSXには無いらしい。そこでOSXにUnix toolsをいれることにした。
- OSXでUnix tools
- Fink、DarwinPortsやMacPortsなどが現状あるが、一番よさそうなのはMacPortsだった。できればDebian系ということでFinkを使いたかったが、Finkは昔から最新のOXバージョンについてはインストールの手間が多いことがある。Snow Leopardはまだその状態。なのでMacPortsにした。
- WoMan
- WoManにmanディレクトリを追加したい
(require 'woman) (add-to-list 'woman-path "/opt/local/man/man?") ;; When you changed 'woman-path or 'woman-manpath, you'd better update woman cache. ;; You can update the cache with C-u M-x woman.
- WoManにmanディレクトリを追加したい
- Basic usage of eblook
- set the character encoding of your terminal into EUC-JP.
- http://www.bookshelf.jp/texi/eblook/eblook_2.html
$ eblook /Volumes/Macintosh\ HD2/Dicts/Kenkyusha_Waei_Daijiten_V5/