Skip to content

Instantly share code, notes, and snippets.

View hchbaw's full-sized avatar

Takeshi Banse hchbaw

View GitHub Profile
@hchbaw
hchbaw / el.el
Last active August 12, 2017 14:21
;; https://twitter.com/supermomonga/status/889235209782046720
;;
;; https://twitter.com/hchbaw/status/895745817897689088
;; https://twitter.com/hchbaw/status/895984112988692481
(defmacro my-eflet (specs &rest body)
(declare (indent 1))
(let ((garg (cl-gensym "args--")))
`(cl-flet (,@(loop for (n b) in specs
collect
`(,@(pcase b
;; https://teratail.com/questions/83177
(use srfi-14 :only (char-set->list))
(define (pr xxs)
(define (stringify xxs listref)
(string-join (concatenate (map listref xxs)) " "))
(begin
($ print $ stringify xxs car)
% git for-each-ref 'refs/tags/v4.10*' --count=5 --sort='-*authordate' \
--format='%(align:8,left)%(refname:short)%(end)%(*authordate:short) %(*authordate:relative)'
v4.10.4 2017-03-18 3 hours ago
v4.10.3 2017-03-15 4 days ago
v4.10.2 2017-03-12 6 days ago
v4.10.1 2017-02-26 3 weeks ago
v4.10 2017-02-19 4 weeks ago
@hchbaw
hchbaw / Makefile
Last active November 24, 2016 04:15
all::
test:
prove --exec zsh test.zsh -v
clean:
rm -rf ./.test-data
rm -f tmp*
.PHONY: test clean
@hchbaw
hchbaw / lircrc
Last active December 27, 2015 19:59
# /usr/share/doc/lirc/html/configure.html
begin mpc
begin
button = KEY_CHANNELUP
mode = mplayer
flags = quit
end
begin
prog = irexec
@hchbaw
hchbaw / try.diff
Last active December 27, 2015 13:29
--- t 2013-11-06 18:17:06.438149762 +0900
+++ try 2013-11-06 18:23:13.816909060 +0900
@@ -2,9 +2,9 @@
LL
〓〓〓〓〓 〓〓〓〓〓 〓〓〓〓〓 〓〓〓〓〓 〓〓〓〓〓
- ヮヰヱヵヶ 丑臼宴縁曳 鬼虚狭脅驚 孤誇黄后耕 奉某貌卜〓
- ゎゐゑ〓〓 於汚乙穏〓 奇既菊却享 巧克懇困昏 〓〓〓〓〓
- 〓〓〓〓〓 〓〓〓〓〓 〓〓〓〓〓 〓〓〓〓〓 〓〓〓〓〓
+ ヮヰヱヵヶ 丑臼宴縁曳 鬼虚狭脅驚 孤誇黄后耕 奉某貌卜鋼
@hchbaw
hchbaw / el.el
Last active December 15, 2015 00:38
;; https://gist.github.com/deton/5138905
;; Thank you very much, deton!
;; tc-tbl を evil-digraphs-table-user と ~/.vim.tcode へ出力します。
(with-temp-buffer
(loop initially (progn
(load "tc-tbl.elc")
(insert "(setq evil-digraphs-table-user '("))
finally (progn
(insert "))")
(write-region (point-min) (point-max) "~/.evil.tcode")
;; evil.el version of textobj-motionmotion.vim
;; https://github.com/hchbaw/textobj-motionmotion.vim
;; Thanks very much the authors of evil.el -- extensible vi layer!
;; TODO:
;; - Am I totally doing wrong?
;; - arrgh! exclusive/inclusive in general
(defvar *evil-motionmotion-point* nil
"Saved value of `point' result before invoking the
`evil-textobj-motionmotion-operator'.")