2013-10-02 Wed
■ (postfix) sendmail オプション [mail]
http://www.postfix-jp.info/trans-2.2/jhtml/mailq.1.html
こんな感じ
sendmail -r myadr@example.net -t < contents.txt
-r: Return-Path の指定
-t: contents 内の To: CC: にしたがって送信
で、contents.txt はこんなかな
To: youradr@example.com
Cc: someadr@example.org
From: myadr@example.net
Subject: Hey man!
<-- header と body は 1行(以上)空ける
This is a body.
I can write anything in here.
la la la...
■ emacs / web-mode.el [emacs]
自社のウェブサイトを全面書き換え中。
以前は XOOPS を使って作成したが、今回は bootstrap を利用してベタで手書き。
で、emacs で html, php がスラスラ書ける mode(elisp) を探して web-mode.el を発見。
かなり強力そう。ここに詳しい。 http://web-mode.org/
+ 設定( at .emacs)
;;;
;;; WEB-MODE
;;;(require 'web-mode)
;;; emacs 23以下の互換
(when (< emacs-major-version 24)
(defalias 'prog-mode 'fundamental-mode))
;;; 適用する拡張子
(add-to-list 'auto-mode-alist '("\\.phtml$" . web-mode))
;(add-to-list 'auto-mode-alist '("\\.tpl\\.php$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.php$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.jsp$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb$" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html?$" . web-mode))
;;; インデント数
(defun web-mode-hook ()
"Hooks for Web mode."
(setq web-mode-html-offset 2)
(setq web-mode-css-offset 2)
(setq web-mode-script-offset 2)
(setq web-mode-php-offset 2)
(setq web-mode-java-offset 2)
(setq web-mode-asp-offset 2)
;; contents も indent 可能にする
(setq web-mode-indent-style 2)
)
(add-hook 'web-mode-hook 'web-mode-hook)
+ bind 参考: http://fukuyama.co/web-mode
- "C-c C-f" (web-mode-toggle-folding)
HTMLタグを折り畳む機能です。
カーソルの位置のタグ内が省略されアンダーラインでマークされます。
戻すときも"C-c C-f"です。
- "C-c C-n" (web-mode-match-tag)
タグの開始タグと終了タグにカーソルを持っていってくれます。
- "C-c C-s" (web-mode-snippet-insert)
snippet を選択できます。
- "C-c C-r" (web-mode-rename-element)
タグの開始タグと終了タグの名前を変えてくれます。
- "C-c C-b" (web-mode-delete-element)
現在位置のタグを丸ごと消せます。
- "C-c C-j" (web-mode-duplicate-element)
現在位置のタグを複製します。
最終更新時間: 2025-01-14 10:03