Skip to content

Instantly share code, notes, and snippets.

View ymkjp's full-sized avatar
:shipit:
while true

Kenta Long Yamamoto ymkjp

:shipit:
while true
View GitHub Profile
@ymkjp
ymkjp / README.md
Last active August 10, 2026 13:28
高市政権の評価 (2026)

高市政権は何に政治資源を投じたか

この文書は、図 takaichi-2026-styled.svg の読み方と採点方法を説明するための公開用メモです。

図の目的は、2026年の高市政権が第221回国会期を中心に、どの政策・政治イシューへ政治的な処理能力を使ったのかを可視化することです。

ここでいう「政治リソース」は、予算額や政策の重要性そのものではありません。首相・内閣の優先順位、国会審議、与野党調整、政府組織の投入を合わせた、いわば政治的な帯域です。

図の読み方

@ymkjp
ymkjp / 不動産を売買する場合.mermaid
Last active August 4, 2026 04:18
[R8] 宅建士 - 税その他
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ymkjp
ymkjp / motal-annotate-bad-moves.js
Last active October 13, 2023 18:27
Annotating bad moves based on Motal's scores
/**
* https://mjai.ekyu.moe/report/888288d74f7ed24c.html#kyoku-6-0
*/
(async ()=>{
const THRESHOLD = 5.0
const createSpan = (text) => {
const suggestion = document.createElement("span")
suggestion.innerText = text
suggestion.style.background = `#ffd5d5`
suggestion.style.margin = `auto .5rem`
@ymkjp
ymkjp / init-local-knaive.sh
Last active December 30, 2019 11:15
Script to install Knative to Minikube without Istio's sidecar injection
#!/usr/bin/env bash
# https://knative.dev/docs/install/knative-with-minikube/
# https://knative.dev/docs/install/installing-istio/#installing-istio-without-sidecar-injection
set -ue
init-local-knaive () {
download-istio
init-istio-lean
;[].forEach.call(document.getElementsByClassName('yt-uix-form-input-textarea'), elm=> {
elm.value = elm.value.replace(/\s+/g, '')
})
@ymkjp
ymkjp / eximage.sh
Last active October 31, 2018 05:01
A script to extract images from XLSX file
#!/bin/bash
# A script to extract images from XLSX file
# Usage:
# chmod u+x ./eximage.sh
# bash ./eximage.sh __PATH_TO_FILE__
SCRIPT_NAME="$(basename ${0})"
TARGET_PATH="${1}"
TARGET_FILENAME="$(basename ${TARGET_PATH})"
@ymkjp
ymkjp / ex.bash
Last active May 10, 2018 22:22
Handy Command
#!/usr/bin/env bash
# Place this command to an arbitrary path e.g. bin/example.bash
# Grant a permission
# chmod u+x bin/ex.bash
# Put a symlink without extension into top of project
# ln -s bin/ex.bash ./ex
# Execute the command
# ./ex init
# Use environment variable to pass arguments (Might better not to make the script such complicated)
@ymkjp
ymkjp / flawfinder.py
Created September 11, 2017 13:30 — forked from boyter/flawfinder.py
Flawfinder
#!/usr/bin/env python
from __future__ import division
"""flawfinder: Find potential security flaws ("hits") in source code.
Usage:
flawfinder [options] [source_code_file]+
See the man page for a description of the options."""
@ymkjp
ymkjp / add-pkey-to-auth-agent.sh
Created August 8, 2017 02:06
Add pkey to auth agent
#!/usr/bin/env bash
# Load this script from bashrc
SESSIONS=(
uname_rsa
uname-us-east-1.pem
)
for SESSION in "${SESSIONS[@]}"; do
[[ $(ssh-add -l | grep "${SESSION}") ]] || ssh-add "${HOME}/.ssh/${SESSION}";
done
#!/usr/bin/env bash
# Usage
# estimator.sh | awk -F"\t" '($2 < 400) {print $0}'
# $ curl -IL https://store.nintendo.co.jp/client_info/CX24DMSJKX/view/userweb/images/Nstore_banner_NX_0601_13.jpg?timestamp=1496291405000
# HTTP/1.1 200 OK
# Accept-Ranges: bytes
# Cache-Control: private
# Content-Length: 844784