Skip to content

Instantly share code, notes, and snippets.

View zk-phi's full-sized avatar
🌴
Summer

zk-phi zk-phi

🌴
Summer
View GitHub Profile
@zk-phi
zk-phi / nquiz.json
Last active October 20, 2025 12:28
nquiz
{
"title": "「ん」",
"description": "答えはすべて「ん」から始まります。",
"shuffle": true,
"author": {
"text": "zk-phi",
"url": "https://zk-phi.github.io/"
},
"problems": [
{
@zk-phi
zk-phi / itquiz.json
Last active October 19, 2025 12:09
itquiz
{
"title": "IT・パソコン",
"shuffle": true,
"author": {
"text": "zk-phi",
"url": "https://zk-phi.github.io/"
},
"problems": [
{
"body": "ファイルの種類・形式を示すために、ファイル名の末尾に付加される、通常3文字程度のアルファベットの識別子をなんという?",
{
"title": "ボドゲ・遊び",
"shuffle": true,
"author": {
"text": "zk-phi",
"url": "https://zk-phi.github.io/"
},
"problems": [
{
"body": "ボードゲーム会などで用いられることがある、大人数でも「あいこ」になりづらい特殊ルールのじゃんけんを、俗に「何じゃんけん」という?",
@zk-phi
zk-phi / nazo.png
Last active April 24, 2025 12:47
@zk-phi
zk-phi / comparator.el
Created January 29, 2025 15:21
Directory comparator
#!emacs --script
;; Compare two directory recursively to find updated/outdated files.
;;
;; Dependencies:
;; - brew install --cask emacs
;; - brew install xxh
;;
;; Usage:
;; - ./comparator.el /path/to/directory/A /path/to/directory/B > output
@zk-phi
zk-phi / macroexpand-file.el
Created May 10, 2021 06:30
macroexpand-file
(require 'macroexp)
(defun read-and-macroexpand-all (stream)
(ignore-errors
(cons (macroexpand-all (read stream))
(read-and-macroexpand-all stream))))
(defun macroexpand-file (src dest)
"ファイル SRC 内のすべてのフォームをマクロ展開して、ファイル DEST に保存する"
(let ((forms (with-temp-buffer
@zk-phi
zk-phi / iidxquiz.json
Last active October 19, 2025 08:18
iidxquiz
{
"title": "IIDX カルトクイズ",
"description": "マイナー曲名などを答えるクイズです。曲名は綴りまで正確に入力してください (スペース、大文字小文字の区別は不要です)。",
"shuffle": true,
"author": {
"text": "zk-phi",
"url": "https://zk-phi.github.io/"
},
"problems": [
{
@zk-phi
zk-phi / beerquiz.json
Last active October 19, 2025 08:18
beer quiz
{
"title": "ビール雑学",
"shuffle": true,
"author": {
"text": "zk-phi",
"url": "https://zk-phi.github.io/"
},
"problems": [
{
"body": "1994年の酒税法改正後初めてビール醸造に参入し、地ビール第1号となった新潟のビールブランドといえば、その地域のかつての行政区分から「何ビール」という?",
@zk-phi
zk-phi / genshijin.el
Created February 13, 2019 09:02
genshijin.el
;; Usage: M-x genshify-region
(defun genshify-string (str)
(let ((res (shell-command-to-string
(concat "echo " (shell-quote-argument str) "| /usr/local/bin/mecab"))))
(mapconcat 'identity
(delq nil
(mapcar (lambda (line)
(cond ((string-match "助詞\\|接頭詞\\|非自立\\|^\\(EOS\\)?$" line) nil)
((string-match "*$" line) (car (split-string line)))
@zk-phi
zk-phi / news.org
Last active November 21, 2019 04:38
news

Changes in Emacs 24.4

Frame and window handling

New commands `toggle-frame-fullscreen’ and `toggle-frame-maximized’,

bound to <f11> and M-<f10>, respectively.

あれっ、これでいいじゃん

Temp Buffer Resize Mode can now adjust the height and width of

windows and frames. The new option `temp-buffer-max-width’ allows you to control the width of temporary buffer windows. Moreover, if the new