This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! font | |
URxvt.allow_bold: false | |
URxvt*font: xft:RictyDiminishedDiscord-Regular:size=14:antialias=true | |
! Cursor | |
URxvt.cursorBlink: true | |
URxvt.cursorColor: #657b83 | |
URxvt.cursorUnderline: false | |
! setting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun magit-mode-setup-return-buffer (mode &rest args) | |
"Setup up a MODE buffer using ARGS to generate its content." | |
(let ((buffer (magit-mode-get-buffer mode t)) | |
(section (magit-current-section))) | |
(with-current-buffer buffer | |
(setq magit-previous-section section) | |
(setq magit-refresh-args args) | |
(funcall mode)) | |
(magit-display-buffer buffer) | |
(with-current-buffer buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; project.clj | |
(defproject hogehoge "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:dependencies [[org.clojure/clojure "1.7.0"] | |
[clj-webdriver "0.7.2"] | |
[com.codeborne/phantomjsdriver "1.2.1" | |
:exclusion [org.seleniumhq.selenium/selenium-java | |
org.seleniumhq.selenium/selenium-server | |
org.seleniumhq.selenium/selenium-remote-driver]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def events [:move :press :move :move :release :press :release :press :press :move :move :move :release :move :move]) | |
(defn make-drag-filter-fn [] | |
(let [pressed? (atom false)] | |
(fn [event] | |
(cond | |
(and @pressed? (= :move event)) true | |
(= :press event) (do (reset! pressed? true) false) | |
(= :release event) (do (reset! pressed? false) false) | |
:else false)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# emacs lispをスクリプトとして実行する | |
# 第一引数はelファイル、それ以降はそのelに渡す引数 | |
# 標準エラー出力への出力を抑制している | |
emacs --script $1 ${@:2:($#-1)} 2> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; cli utility functions | |
(defun println (str) | |
(princ (format "%s\n" str))) | |
(defun pp (obj) | |
(println (prin1-to-string obj))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!escript | |
;; ライブラリの読み込み | |
;; Loading...と標準エラー出力に出てしまう(escript側で出ないようにしている) | |
(load-file (expand-file-name "~/.emacs.d/cli-util.el")) | |
(load-file (expand-file-name "~/.emacs.d/el-get/dash/dash.el")) | |
(load-file (expand-file-name "~/.emacs.d/el-get/s/s.el")) | |
;; 組み込みライブラリの読み込み | |
(require 'json) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Lazy | |
{ | |
public static function isClosure ($obj) | |
{ | |
return is_object($obj) && $obj instanceof Closure; | |
} | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'dash) | |
(defconst PI 3.1415) | |
(defconst a 0.05) | |
(defvar scale-x 0.3 | |
"x軸拡大率") | |
(defvar scale-y 0.3 | |
"y軸拡大率") |