Skip to content

Instantly share code, notes, and snippets.

View tyabu12's full-sized avatar

Tomohito YABU tyabu12

  • Tokyo, Japan
View GitHub Profile
@tyabu12
tyabu12 / hamoru-coverage.json
Last active March 29, 2026 23:53
hamoru coverate
{"label":"coverage","message":"67.24%","schemaVersion":1,"color":"hsl(80, 100%, 40%)"}
@tyabu12
tyabu12 / statusline.py
Last active March 20, 2026 07:42
My ClaudeCode statusline
#!/usr/bin/env python3
"""Statusline script for Claude Code: reads JSON from stdin, prints model/context info."""
import json, sys, os, re
data = json.load(sys.stdin)
RESET = '\033[0m'
RINGS = ['○', '◔', '◑', '◕', '●']
def gradient(pct):
@tyabu12
tyabu12 / holonia-backend-coverage.json
Last active March 28, 2026 08:54
holonia coverage
{"label":"backend coverage","message":"90.24%","schemaVersion":1,"color":"hsl(108, 100%, 40%)"}
import readline
import sqlite3
def print_row(row):
print('(' + ', '.join(str(_) for _ in row) + ')')
conn = sqlite3.connect(':memory:')
c = conn.cursor()
while True:
@tyabu12
tyabu12 / isucon8-qualifier-bench.sh
Last active July 27, 2019 05:21
ISUCON 8予選の vagrant からベンチ投げるスクリプト
#!/bin/bash
# 初回のみ
git clone --depth 1 https://github.com/matsuu/vagrant-isucon
cd vagrant-isucon/isucon8-qualifier
vagrant up bench
# ホストアドレスをカンマ区切りで指定
IMAGE_HOST_IP="XXX.XXX.XXX.XXX,XXX.XXX.XXX.XXX"
@tyabu12
tyabu12 / vlc_gen_thumbnails.sh
Last active December 21, 2018 15:10
Thumbnails generator script using VLC.
#!/bin/bash
VLC="vlc -I dummy"
TARGET_DIR="movies"
THUMBNAIL_DIR="movies/thumbnails"
THUMBNAIL_FMT="jpg"
set -eux
gen_options() {
@tyabu12
tyabu12 / cloudSettings
Last active March 5, 2022 13:56
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-03-05T13:56:10.268Z","extensionVersion":"v3.4.3"}
@tyabu12
tyabu12 / Vagrantfile
Last active November 28, 2018 05:47
A Vagrantfile to create Debian stretch with Docker.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@tyabu12
tyabu12 / isucon6-qualifier-bench.sh
Last active July 15, 2019 01:23
ISUCON6 予選 で vagrant からベンチ投げるスクリプト
#!/bin/bash
# 初回のみ
git clone --depth 1 https://github.com/matsuu/vagrant-isucon
cd vagrant-isucon/isucon6-qualifier
vagrant up bench
IMAGE_HOST_IP="XXX.XXX.XXX.XXX"
vagrant ssh bench -c "sudo -u isucon sh -c 'cd /home/isucon/isucon6q; ./isucon6q-bench -target $IMAGE_HOST_IP'"
@tyabu12
tyabu12 / upload_to_vagrant_cloud.sh
Last active November 4, 2022 07:46
Vagrant cloud upload script.
#!/bin/bash
USERNAME="CHANGE ME"
PROVIDER_NAME="virtualbox"
ACCESS_TOKEN="CHANGE ME"
set -eu
if [ $# -ne 3 ]; then
cat <<_EOT_