Skip to content

Instantly share code, notes, and snippets.

View moratori's full-sized avatar
😸

Katsuyoshi Ozaki moratori

😸
View GitHub Profile
@tetsuharu-kono
tetsuharu-kono / wifi_site_survey.sh
Last active January 30, 2023 00:14
Wi-Fi site survey script for macOS
#!/bin/zsh
# Wi-Fi Site Survey
# 2020.07.22 Rev. 0.1
# First release
# 2023.01.30 Rev. 0.2
# Fixed channel and BSSID not being retrieved by Monterey
# Fail on unset variables and command errors
set -ue -o pipefail
@marionette-of-u
marionette-of-u / trs_lie-ring.ml
Created July 10, 2015 07:10
OCamlによるTerm Rewriting Systemの実装とリー環への完備化の適用
exception INVALID_ARGUMENT
let rec nth =
function (x :: _, 0) -> x
| (x :: xs, n) -> nth(xs, n - 1)
| ([], _) -> raise INVALID_ARGUMENT
let null s =
match s with
| [] -> true
@y2q-actionman
y2q-actionman / agenda.org
Last active December 27, 2021 07:26
型宣言を付けたら遅くなった話

型宣言を付けたら遅くなった話

(defun split-method-call (str)
(let* ((strs (coerce (jcall "split" str "/") 'list))
(method (car (last strs)))
(class (format nil "~{~A~^/~}" (butlast strs))))
(list class method)))
(defun static-field-p (str)
(destructuring-bind (class field)
(split-method-call str)
(and (not (string= "" class))