Skip to content

Instantly share code, notes, and snippets.

@k0f1sh
k0f1sh / escript
Created December 11, 2013 18:27
emacs lispをスクリプトとして使う
#!/bin/bash
#
# emacs lispをスクリプトとして実行する
# 第一引数はelファイル、それ以降はそのelに渡す引数
# 標準エラー出力への出力を抑制している
emacs --script $1 ${@:2:($#-1)} 2> /dev/null
@k0f1sh
k0f1sh / zone-pgm-rainbow
Last active April 27, 2018 15:51
虹色zone
;; zone-pgm-rainbow
(defun decimal->hex (n)
(format "%02X" n))
(defun hsv->rgb (h s v)
(let ((h (max 0 (min 360 h)))
(s (/ (max 0 (min 100 s)) 100.0))
(v (/ (max 0 (min 100 v)) 100.0)))
(if (= 0 s)
@k0f1sh
k0f1sh / naruto.el
Last active December 20, 2015 03:38
(require 'dash)
(defconst PI 3.1415)
(defconst a 0.05)
(defvar scale-x 0.3
"x軸拡大率")
(defvar scale-y 0.3
"y軸拡大率")