Skip to content

Instantly share code, notes, and snippets.

@dullage
dullage / cdm_fio.sh
Last active February 17, 2026 07:32 — forked from snizovtsev/cdm_fio.sh
Reproducing CrystalDiskMark tests with fio
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9.
# Recommended SIZE setting for different drives:
# (SATA) SSD: 1024
# (ANY) HDD: 256
# (High End NVME) SSD: 4096
# (Low-Mid End NVME) SSD: 1024
@tak-dcxi
tak-dcxi / typography.md
Last active February 17, 2026 07:32
タイポグラフィCSS

タイポグラフィ

font-family

  • フォントは Web サイトの印象に直結するため、一概にこれが良いとは言えない。
  • 特にこれと言った指定がされていない場合は font-family: sans-serif のみで良い。
    • Windows 11/10 では 2025 年のアップデートにより Noto Sans JP が標準搭載された。色々と問題があった游ゴシックの呪縛から解放されたのは大きい。
    • Android はメーカーにより削除されている可能性はあるが、そうでない場合は原則的に Noto Sans CJK JP が適用される。
    • Mac/iOS はヒラギノ角ゴ ProN が適用される。
  • アップデートによるフォントの変更の懸念はあるものの、ディスレクシアの方々は UD デジタル教科書体などの読みやすいフォントを設定している可能性があるため、アクセシビリティの観点では font-family: sans-serif の指定を推奨する。
@karpathy
karpathy / microgpt.py
Last active February 17, 2026 07:32
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@niw
niw / EpaperNFCProtocol-ja.md
Last active February 17, 2026 07:29
400x300 4-Color e-Paper NFC Protocol

NFC で書き換えられる 400x300 4色電子ペーパーのプロトコル

いま巷で話題の NFC で書き換えできる名札サイズの電子ペーパーのプロトコルを調べました。

1. 前提

  • 画面サイズ: 400 x 300
  • 色インデックス (2bit):
    • 0 = Black
  • 1 = White
#!/usr/bin/env zsh
# Multi-project worktree manager with Claude support
#
# ASSUMPTIONS & SETUP:
# - Your git projects live in: ~/projects/
# - Worktrees will be created in: ~/projects/worktrees/<project>/<branch>
# - New branches will be named: <your-username>/<feature-name>
#
# DIRECTORY STRUCTURE EXAMPLE:
# ~/projects/
@brandonjp
brandonjp / findOverflowParents.js
Last active February 17, 2026 07:23
find overflow:hidden ancestors
// when you're trying to use `position:sticky` on an element
// you'll have trouble if any parent/ancestor element has
// overflow set to anything other than "visible" (such as: auto,hidden,overlay,scroll)
// & turns out if a parent is `display:flex` it might need some love
// (to remedy this you can set the `align-self` of your sticky element)
// see here for how the display & align-self properties affect: http://bit.ly/2ZaRu4o
// so, to find those troublesome parents...
// copy & paste this into Chrome Inspector/Dev Tools console
// (and be sure to change the #stickyElement below, if needed)