Note
notes
// kea dhcpでclassless static route配布 | |
{ | |
"Dhcp4": { | |
// .... | |
"subnet4": [ | |
{ | |
"id": 1, | |
"subnet": "192.168.0.0/24", | |
"option-data": [ | |
{ |
(leaf mastodon | |
:preface | |
(leaf emojify | |
:ensure t | |
:custom `((emojify-emojis-dir . ,(cache-sub-dir "emojify")))) | |
:ensure t | |
:custom | |
(mastodon-instance-url . "https://mstdn.example.com") | |
(mastodon-active-user . "user-name") | |
(mastodon-media--enable-image-caching . t) |
#!/usr/bin/env bash | |
set -euo pipefail | |
# requirements: bc, curl, wezterm, jq, imagemagick | |
base='http://www.kmoni.bosai.go.jp' | |
wdir="$(mktemp --directory -t kmoni)" | |
rdate="$(date -r $(($(date +%s) - 4)) +%Y%m%d%H%M%S)" | |
baseimg="base_map_w.gif" | |
jmasimg="${rdate}.jma_s.gif" | |
waveimg="${rdate}.eew.gif" |
#!/usr/bin/env emacs --script | |
(cond ((eq system-type 'darwin) | |
(dolist (fpath (split-string (shell-command-to-string "pbpaste") "\n" t)) | |
(let* ((output (replace-regexp-in-string "\\(?:\\.\\w+\\)?$" ".jpg" fpath)) | |
(cmd (format "sips -s format jpeg -s formatOptions 80 \'%s\' --out \'%s\'" | |
fpath output))) | |
(when (and (file-exists-p fpath) | |
(string-match-p "\\.png\\'" fpath)) | |
(princ (format "=> cocnvert: %s\n" fpath)) |
#!/usr/bin/env hy | |
(import sys) | |
(import tiktoken) | |
(require hyrule [defmain]) | |
(defmain [] | |
(len (. (tiktoken.encoding_for_model "gpt-4") | |
(encode (sys.stdin.read)))))) |
#!/usr/bin/env emacs --script | |
(defun fizzbuzz (num) | |
(princ (mapconcat | |
#'(lambda (i) | |
(cond | |
((= 0 (% i 3) | |
(% i 5)) "FizzBuzz") | |
((= 0 (% i 3)) "Fizz") | |
((= 0 (% i 5)) "Buzz") |
#!/usr/bin/env hy | |
(defn fizzbuzz_match_map [num] | |
(print (.join | |
"\n" | |
(map (fn [i] | |
(match #((% i 3) (% i 5)) | |
#(0 0) "FizzBuzz" | |
#(0 _) "Fizz" | |
#(_ 0) "Buzz" |
#!/usr/bin/env emacs --script | |
(if (eq system-type 'darwin) | |
(dolist (fpath (split-string (shell-command-to-string "pbpaste") "\n" t)) | |
(let* ((output (replace-regexp-in-string "\\(?:\\.\\w+\\)?$" ".jpg" fpath)) | |
(cmd (format "sips -s format jpeg -s formatOptions 80 \'%s\' --out \'%s\'" | |
fpath output))) | |
(when (and (file-exists-p fpath) | |
(string-match-p "\\.png\\'" fpath)) | |
(princ (format "=> cocnvert: %s\n" fpath)) |
echo -e "
e38090e5a0b1e5918ae38091
0d0ae382a2e383b3e38389e383ade382a4e38389e381af
e7949fe381a8e6adbbe38292e7b9b0e3828ae8bf94e38199e5ad98e59ca8e381a7e38182e3828be38082
" `# end of the A part` "0d0a" "
e38090e5a0b1e5918ae380910
d0ae8bcaae5bbbbe381aee980a3e98e96e3818ce38282e3819fe38289e38199e381aee381afe38081e