Skip to content

Instantly share code, notes, and snippets.

(when (locate-library "tomatinho")
(autoload 'tomatinho "tomatinho" "Pomodoro Technique for emacs." t)
(eval-after-load "tomatinho"
'(progn
(when (boundp 'tomatinho-bar-length)
(setq tomatinho-bar-length 25))
(when (boundp 'tomatinho-pomodoro-length)
(setq tomatinho-pomodoro-length 25)) ; 25 分
(defvar tomatinho-pomodoro-pause-length 5) ; 5 分
(defvar tomatinho-pomodoro-long-pause-length 20) ; 20 分
@sluchin
sluchin / .emacs.el
Last active December 10, 2015 22:08
;; tar + gzip で圧縮
(when (and (executable-find "tar") (executable-find "gzip"))
(defun dired-do-tar-gzip (arg)
"Execute tar and gzip command"
(interactive "P")
(let ((files (dired-get-marked-files t current-prefix-arg)))
(let ((filename (read-string (concat "Filename(" (car files) ".tar.gz): "))))
(when (string= "" filename)
(setq filename (concat (car files) ".tar.gz")))
(when (not (string-match
@sluchin
sluchin / .emacs.el
Last active December 10, 2015 02:18
;;; GDB
;; 有用なバッファを開くモード
(setq gdb-many-windows t)
;; 変数の上にマウスカーソルを置くと値を表示
(add-hook 'gdb-mode-hook '(lambda () (gud-tooltip-mode t)))
;; I/O バッファを表示
(setq gdb-use-separate-io-buffer t)
;; t にすると mini buffer に値が表示される
(setq gud-tooltip-echo-area nil)
(defun list-system-header-files ()
(directory-files "/usr/include" nil "^.*\\.h$"))
(defvar system-header-files-cache (list-system-header-files))
(defvar ac-source-system-header-files
'((candidates . system-header-files-cache)))
;; 画面の解像度によりフレームサイズを変化させる
(when window-system
(let ((height-gain))
(cond ((>= (x-display-pixel-height) 900)
(setq height-gain 0.9))
((>= (x-display-pixel-height) 768)
(setq height-gain 0.8))
(t
(setq height-gain 0.7)))
(message "%f" height-gain)