graph TD;
subgraph 結果
R0[何もなし]
R1[強化値ダウン]
R2[銀剥がし]
R3[メッキ印消し]
R4[印消し]
end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GoogleMeet: auto mute / auto join | |
// @namespace http://tampermonkey.net/ | |
// @version 2025-04-08 | |
// @description GoogleMeetにカメラとマイクの自動ミュートや自動参加機能を追加する。 | |
// @author Yoshiaki Kawazu ( https://x.com/kawaz ) | |
// @match https://meet.google.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.com | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# 1Password CLI の op run を、引数でもインジェクション出来るようにするラッパースクリプト。 | |
# https://gist.github.com/kawaz/a2d0c5bece913a34d2a6d4a02ca6cc3c | |
op_args=() | |
while (( 0 < $# )); do | |
a=$1 | |
shift | |
op_args+=("$a") | |
[[ $a == -- ]] && break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 再起動前のメモ | |
sudo bash -c "set -x; ps auxf; top -bn1; netstat -anp; mount; docker ps" > reboot2025.txt 2>&1 | |
# sudo shutdown -r now | |
# 再起動後に確認 | |
## 本当に再起動したか? | |
uptime | |
## netstat の比較 | |
diff <(cat reboot2025.txt|grep LISTEN|perl -pe's/\d+\///;s/\s\d+\s/ /g;s/[ \t]+/\t/g'|sort -V|perl -pe's/\d+\///;s/[ \t]+/\t/g') <(sudo netstat -anp|grep LISTEN|perl -pe's/\d+\///;s/\s\d+\s/ /g;s/[ \t]+/\t/g'|sort -V) | |
## mount 状態の比較 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ローカルで発生したメールを全部SESにリレーして送信する | |
sender_canonical_maps=regexp:/etc/postfix/sender_canonical_maps.regexp | |
sender_dependent_relayhost_maps=hash:/etc/postfix/sender_dependent_relayhost_maps regexp:/etc/postfix/sender_dependent_relayhost_maps.regexp | |
smtp_sasl_auth_enable=yes | |
smtp_sasl_password_maps=hash:/etc/postfix/smtp_sasl_password_maps regexp:/etc/postfix/smtp_sasl_password_maps.regexp | |
smtp_sasl_security_options=noanonymous | |
smtp_sender_dependent_authentication=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* React等が利用されているサイトでは value プロパティに値をセットしてもWEBアプリに変更が伝わらないことがあるが、それを上手くやる。 | |
* valueやcheckedプロパティを変更する際はフレームワーク側で差し替えられてるケースの対応として、ネイティブパーツのsetterを直接使って値を書き換えるのが確実 | |
* | |
* @param {string | Element | Array<string | Element>} target - 値を設定する対象の要素。文字列(セレクタ)、Element、またはそれらの配列 | |
* @param {string | boolean} value - 設定する値。input/textareaの場合は文字列、checkboxの場合は真偽値でもOK | |
* @param {boolean} [immediate=false] - trueの場合は即座に値を更新、falseの場合は次のイベントループで更新(特別な理由がない限りはfalseでOK) | |
*/ | |
function setValue( | |
target, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# テンプレート変数を用意 | |
declare -A TEMPLATE_KV=() | |
while read -r k v; do | |
k=${k//-/_}; k=${k//:/}; k=${k^^} | |
TEMPLATE_KV["$k"]="$v" | |
done < <(ec2-metadata -i -t -h -o -z -p -v) | |
TEMPLATE_KV[REGION]=$(perl -pe's/[a-z]$//' <<< "${TEMPLATE_KV[PLACEMENT]}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 日本語の声をランダムに1つ選ぶ | |
const voices = speechSynthesis.getVoices().filter(v=>/^ja-/.test(v.lang)) | |
const voice = voices[Math.floor(voices.length*100000*Math.random())%voices.length] | |
const ssu = new SpeechSynthesisUtterance() | |
ssu.lang = 'ja-JP' // 言語 | |
ssu.voice = voice // 発話に使用する音声(未設定の場合lang設定を見て適切な音声が選ばれる | |
ssu.volume = 1 // 発話の音量 0~1、default=1 | |
ssu.rate = 1 // 発話の速度 0.1~10、default=1 | |
ssu.pitch = 1 // 発話の音程 0~2、default=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e -o pipefail | |
# HostedZone[].Id を保存 | |
aws route53 list-hosted-zones | jq .HostedZones[].Id -r | tee HostedZoneIds.txt | |
# 全HostedZoneのRecordSetを取得 | |
while read id; do | |
aws route53 list-resource-record-sets --hosted-zone-id "$id" | |
done <HostedZoneIds.txt | tee rs.json.tmp |
NewerOlder