以下のあたり
こんな状況になって
top - 16:11:06 up 7:32, 0 users, load average: 0.84, 2.05, 1.42
Tasks: 2 total, 1 running, 1 sleeping, 0 stopped, 0 zombie
以下のあたり
こんな状況になって
top - 16:11:06 up 7:32, 0 users, load average: 0.84, 2.05, 1.42
Tasks: 2 total, 1 running, 1 sleeping, 0 stopped, 0 zombie
気になったからちょっと遊んでみる。OSI-approved License のコードならいいけど、そうじゃない場合はライセンス注意。
AUR に https://aur.archlinux.org/packages/codeql があるからこれを使う。
% paru -S codeql
#!/bin/bash | |
usage_exit() { | |
cat <<EOF | |
Usage: $0 <query> | |
Search text in source code from GitHub. | |
Options: | |
-h show this help |
ブラウザのコンソールからこんな感じで。
const fetch_and_print = url => fetch(url).then(x => x.text()).then(x => console.log(JSON.stringify(JSON.parse(x), null, 2)));
fetch_and_print("/api/alertmanager/grafana/config/api/v1/alerts")
fetch_and_print("/api/prometheus/grafana/api/v1/rules")
大体こんな感じで。
sum by(pod) (increase(kube_pod_container_status_restarts_total{some_condition}[2m]))
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"strings" | |
) | |
type Payload struct { |
emacs-jp に書いたやつ。
(defun vertico--compare-prefer-prefix (x y)
(let ((content (or (car-safe vertico--input) (minibuffer-contents))))
(pcase (cons (string-prefix-p content x) (string-prefix-p content y))
((or '(t . t) '(nil . nil)) (vertico--length-string< x y))
(`(,match . ,_) match))))