Skip to content

Instantly share code, notes, and snippets.

View saitonakamura's full-sized avatar
😺

Michael サイトー 中村 Bashurov saitonakamura

😺
View GitHub Profile
@saitonakamura
saitonakamura / github-download-latest-release.sh
Created January 15, 2021 19:28
Will return url of latest asset in given repository filtering asset by 2 substring patterns
# Will return url of latest asset in given repository filtering asset by 2 substring patterns
# e.g. get-github-latest-release ogham/exa exa-linux x86_64
# will returns https://github.com/ogham/exa/releases/download/v0.9.0/exa-linux-x86_64-0.9.0.zip
get-github-latest-release() {
curl -s -L "https://api.github.com/repos/$1/releases/latest" | \
jq ".assets[] | select(.name | contains(\"$2\") and contains(\"$3\")) | .browser_download_url" --raw-output
}
# Example of usage by installing exa
# curl -L "$(get-github-latest-release ogham/exa exa-linux x86_64)" -o /tmp/exa.zip
@saitonakamura
saitonakamura / RoundedRectGeometry.ts
Created September 15, 2021 11:54
Rounded rectangle geometry for three.js
import {
BufferGeometry,
Float32BufferAttribute,
ShapeUtils,
Shape,
} from "three";
// Adapted from ShapeGeometry
export class RoundedRectGeometry extends BufferGeometry {
parameters: {
@saitonakamura
saitonakamura / README.md
Last active July 28, 2026 08:22
Claude Code status line: context window bar, cwd, model state (POSIX sh+jq and PowerShell)

Claude Code status line

One line at the bottom of the Claude Code TUI: context-window usage, cwd, and model state.

[██████····] 118k/200k 59%  ·  dotfiles/.config/claude  ·  Opus 5 1M/high fast
  • context window — a 10-cell bar plus used/size and a percentage, green