Mac OS X Lion で Ricty を生成する

curl https://raw.github.com/gist/3110110/ef3c7fb1fc2e777cf01a5e747bb4670d26e9c5ff/generate_ricty.sh | sh

Homebrew で cmigemo を入れる

参考 http://d.hatena.ne.jp/yosisa/20110731 https://gist.github.com/gists/search?q=cmigemo.rb&x=0&y=0 http://shibayu36.hatenablog.com/entry/2012/07/03/091223 そもそも SKK-JISYO.L を落とせる openlab.jp が落ちてるのが悪い 復活したらこの patch…

gtags の便利設定と関数一覧を出す関数の自前定義(gtags-parse-file)

gtags.el Version: 2.6 でのみ確認、他ではほぼ確実に動かない。以下のような感じに gtags-goto-tag を修正して、 ((char-equal flag-char ?r) (setq prefix "(R)")) ((char-equal flag-char ?f) (setq prefix "(F)")) (t (setq prefix "(D)"))) 以下のよう…

パスワード付きの部屋に入る

:pass じゃなくて :key

emacs で phpmd の結果を使う

みたいなのを使って、M-x compile で myphpmd test.php text unusedcode,naming とすると使いやすい。 (defun phpmd () (interactive) (let ((source-code (file-name-nondirectory (buffer-file-name))) (report-format "text") (ruleset "unusedcode")) (c…

入れた

http://code.google.com/p/gdipp/downloads/list

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

;; grep-find (defvar dgrep-find-default-cmd "ack --nocolor --nogroup --type=%s %s \"%s\" \"%s\"") (defvar dgrep-find-default-type "elisp") (defvar dgrep-find-default-ctx 3) (defvar dgrep-find-default-subject "") (defun dgrep-find (dir subj…

howm の todo とかを growl で通知(手動登録)@Windows

elisp growl-notifyが必要 (require 'parse-time) (defvar howm-notify-before-min 5) (defvar howm-notify-title "予定の通知") (defun howm-growl-notify () (interactive) (let* ((line (thing-at-point 'line)) (time (parse-time-string line)) (sec (f…

Emacs と growlnotify@windows

elisp (defvar growl-program "growlnotify") (defvar growl-notify-icon (concat data-directory "images/icons/hicolor/128x128/apps/emacs.png")) (defvar growl-notify-application-name "Emacs") (defun growl-notify (title message) (interactive) (c…

anything-imenu-at-point

(defun anything-imenu-at-point () (interactive) (anything 'anything-c-source-imenu (current-word) nil nil nil "*anything imenu*") )

calfw-calendar に howm と diary の内容どっちも表示

僕はプライベートの予定は google-emacs で google カレンダーと diary を同期して管理していて、仕事の予定は howm で管理している。calfw-howm と calfw-calendar がそれぞれ用意されているので、それぞれを calfw-calendar に表示することはできるけれど…

cfw:open-howm-calendar して今日の howm に日付だけ挿入できればいいや

(defun my-cfw-open-schedule-buffer () (interactive) (let ((date (cfw:cursor-to-nearest-date))) (howm-find-today) (goto-char (point-max)) (insert (format "[%04d-%02d-%02d]@ " (calendar-extract-year date) (calendar-extract-month date) (calen…

calendar の曜日とか月とかの表示を変える

;; 月 (setq calendar-month-name-array (vconcat (mapcar (lambda (n) (concat n "月")) (mapcar 'number-to-string [1 2 3 4 5 6 7 8 9 10 11 12])))) ;; 曜日 (setq calendar-day-name-array (vconcat (mapcar (lambda (n) (concat (char-to-string n) "…

mozrepl でリロード、タブ操作、Google・ALC 検索

参考 Firefox と Emacs の会話 | Amrta Firefox で閲覧中の画面を Emacs からスムーススクロールする elisp - memo (autoload 'moz-minor-mode "moz" "Mozilla Minor and Inferior Mozilla Modes" t) (moz-minor-mode t) (defun moz-close-tab-or-window () …

いまさら flyspell を動かした

参考 よしいずの雑記帳 Windows XPにおけるispell for Win32のセットアップ作業のメモ 【Proton.jp】 ispellの設定と利用法 本文 ispell 入れなきゃいけないのかと思ったら aspell でいいのね。cygwin にくっついてきていたので emacs の設定だけで動いた。 …

emacs-google の calendar をローカルの Timezone を使うようにしたのと Windows 対応

https://github.com/yewton/emacs-google-calendar にあげました。…元の作者さんに連絡したほうがよいのだろうなぁ

Google カレンダー連携して howm メニューに表示

Meadow/Emacs memo: メモを書こうに、homw menu に diary を表示する方法がある。Google calendar と diary の連携は[emacs][google][calendar]Emacs の calendar と Google カレンダーを連携させるをすれば出来るので、この両方をやれば目的を達成できるこ…

windows で magit を使いはじめるまで

参考 magit - メモ用なWiki - livedoor Wiki(ウィキ) 本文 落としてくる Downloads · magit/magit make とか持って無いし要はバイトコンパイルするだけのようなので、下のようなのをでっちあげる ;; M-x eval-buffer (setq load-path (cons (expand-file-n…

カーソル下の数字っぽいものをインクリメント・デクリメントする

参考あるいはパクリ元 カーソルの位置にある数字列をインクリメントする emacs lisp 改修 - 質のないDiary H 本文 vim の Ctrl+a, Ctrl+x に相当するらしい機能。参考元にプラスでデクリメントをつけ、ついでに samrt-rep の設定例を。 (defun operate-strin…

calendar で日付選択して貼り付ける関数作った

デフォルトで howm 形式のフォーマットで出力する。 (calendar-exit)して(insert)しているので、ウインドウ構成によっては思ったところに貼り付けられないかもしれない。前にいた window をとれたらいいんだけど。 (eval-after-load "calendar" '(progn (def…

Emacs の calendar と Google カレンダーを連携させる

はじめに Google カレンダーを Emacs で見る方法があるというので探してみたが、そのままでは Windows 上で動かなかった。 動くようにする方法を書く。(追記アリ) 参考 まぁるいしっぽ:emacsのカレンダーでgoogle calendarを読み込む googlecalendar - emacs…

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

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…