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

ウインドウ最大化トグルコマンド

http://www.bookshelf.jp/2ch/software/1005469775.html#808 ;; フレームサイズをトグルで切り替え (setq my-frame-max-flag nil) (defun my-toggle-frame-size () (interactive) (if my-frame-max-flag (progn (w32-send-sys-command 61728);; 最大化を元に…

コミットログに自動でブランチ名を入れる2

http://d.hatena.ne.jp/yuto_sasaki/20120127/1327650259 を改良 ;; http://hogepiyo.cmo/svn/hoge/branches/hogepiyo/dottokom ;; dsvn defadvice ;; Emacs/Lisp/Drill - Emacsグループ <http://emacs.g.hatena.ne.jp/k1LoW/200810> (defadvice svn-commit (around svn-commit-around activate) (goto-</http://emacs.g.hatena.ne.jp/k1low/200810>…

ETag に "W/" がついたりつかなかったりする

httpd-2.2.22 の modules/http/http_etag.c の app_make_etag 関数のコメントに、以下のように書いてある。 /* * Construct an entity tag (ETag) from resource information. If it's a real * file, build in some of the file characteristics. If the mo…

PHPUnit の Database Extension の Composite データセットの作り方

$ phpunit --version PHPUnit 3.6.10 by Sebastian Bergmann. DbUnit-1.1.2。ここに書かれてあるとおりにやったら以下のエラーが出た。 Argument 1 passed to PHPUnit_Extensions_Database_DataSet_CompositeDataSet::__construct() must be an array, none …

max-time と connect-timeout 両方設定したら合算なのどっちかが優先なの

$ time curl --connect-timeout 3 http://192.168.56.5 curl: (28) connect() timed out! real 0m3.009s user 0m0.000s sys 0m0.000s $ time curl --connect-timeout 3 --max-time 1 http://192.168.56.5 curl: (28) connect() timed out! real 0m1.008s use…

ディスク容量増やす

環境 ホスト Windows 7 64bit ゲスト CentOS release 5.7 (Final) シチュエーション もともとデフォルト設定の 8 GB で作成したけれど、 50 GB に増やしたくなった。 方法 参考、あるいはパクリ元 【Ubuntu】Virtualbox の仮想ハードディスクの容量を増やす…

コミットログに自動でブランチ名を入れる

参考 dsvnでcommitログに変更ファイルを自動入力する - Emacs/Lisp/Drill - Emacsグループ (defadvice svn-commit (around svn-commit-around activate) (goto-char (point-min)) (if (re-search-forward "\\(branches\\|tags\\)/[^/]+" nil t) (kill-new (m…

ディレクトリと探したいもの与えると grep-find してくれる関数

;; dgrep-find (defun dgrep-find (dir subject &optional cmd) (interactive "DDiretory: \nsSubject: ") (let ( (cmd (or cmd "find %s -type f ! -wholename '*/.svn/*' ! -wholename '*/tplc/*' -name '*.php' | xargs grep -3 -nH '%s'")) ) (when (tra…

pwd でカレントディレクトリから3階層上までを表示したい

sh

コマンド pwd | sed "s@$HOME\(/.*\)\?\$@~\1@" | rev | perl -nle '@a=(m@[^/]+@g);if($#a<3){print;}else{print join("/",@a[0,1,2])."/..";}' | rev 解説 カレントディレクトリを出力 ホームディレクトリを「~」に置換 単純に置換すると、$HOME が「/hom…

dsvn.el でリモートコミット

tramp LC_ALL に C を設定している箇所全て、ja_JP.UTF-8 を設定するように修正する。 dsvn http://svn.apache.org/repos/asf/subversion/trunk/contrib/client-side/emacs/dsvn.el ローカルの tmp ファイルにコミットメッセージを出力するのではなく、リモ…

dsvn.el ってどこにあるんだ

http://svn.apache.org/repos/asf/subversion/tags/1.7.2/contrib/client-side/emacs/dsvn.el

dsvn でリモートの svn log とかが文字化ける

tramp.el の中で (setenv "LC_ALL" "C") されているのが原因。 (setenv "LC_ALL" "ja_JP.UTF-8") などとする。

通常とは異なるポートに tramp で繋ぐ

# でポート指定 /plink:user@host#10020:/home/user/

Bash のプロンプトに SVN のブランチ名を表示したい2

ブランチ名だけわかればいいのでちょっと改造。 __my_parse_svn_branch2() { local LANG=C local svn_url=`svn info 2>/dev/null | sed -ne 's/^URL: //p'` echo $svn_url | perl -e 'while(<STDIN>) { if(m@(trunk|branches|tags)(/([^/]+))?@) { if($1 eq "trunk"</stdin>…