Skip to content

Instantly share code, notes, and snippets.

View ROCKTAKEY's full-sized avatar
💭
I may be slow to respond.

ROCKTAKEY ROCKTAKEY

💭
I may be slow to respond.
View GitHub Profile
(require 'cl-lib) ; `cl-letf', `cl-flet'
(require 'cl) ; `flet'
(defun func1 ()
"`original'というシンボルを返すだけの関数。"
'original)
(defun print-func1 ()
"`func1'を呼び出したときの返り値を表示する関数。"
(message "%s" (func1)))
(use-modules
(guix packages)
((guix licenses) #:prefix license:)
(guix git-download)
(guix download)
(guix build-system gnu)
(guix build-system cmake)
(gnu packages commencement)
(gnu packages hurd)
(gnu packages icu4c)
@ROCKTAKEY
ROCKTAKEY / my:elscreen-text.el
Created September 5, 2020 06:03
Get tab text of elscreen.
(defun my:elscreen-text ()
""
(let ((screen-list (sort (elscreen-get-screen-list) '<))
(screen-to-name-alist (elscreen-get-screen-to-name-alist))
(current-screen (elscreen-get-current-screen))
(half-space (propertize
" "
'display '(space :width 0.5)))
(tab-separator (propertize
" "
(defun my-org-netlify (str)
(concat
(save-restriction
(widen)
(save-excursion
(while (ignore-errors (org-up-element) t))
(let* ((entry (org-element-at-point)))
(org-element-property :EXPORT_FILE_NAME entry))))
"/" str))
@ROCKTAKEY
ROCKTAKEY / each-bentchmark.el
Created March 18, 2019 13:50
each-benchmark.el
(require 'cl-lib)
(defun each-benchmark (repetitions function-list &optional args)
""
(cl-loop
with a
for func in function-list
do (setq a (benchmark-run repetitions
(apply func args)))
collect (cons func (car a))))
@ROCKTAKEY
ROCKTAKEY / ccls-batch.bat
Created March 11, 2019 08:52
Build ccls in Windows with MSYS.
git clone https://github.com/MaskRay/ccls/ --recursive
cd ccls
cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -G "MSYS Makefiles" -DCMAKE_CXX_FLAGS=-D__STDC_FORMAT_MACROS
cmake --build Release