Skip to content

Instantly share code, notes, and snippets.

View ohton's full-sized avatar

ohton (Masa O) ohton

View GitHub Profile
@ohton
ohton / check_zip_encoding.py
Last active January 3, 2026 16:10
macOSのFinder圧縮やzipコマンド圧縮でUTF-8フラグが立たないので付け直す
#!/usr/bin/env python3
# Usage: python3 check_zip_encoding.py archive.zip
# 出力: 各エントリの general purpose bit, UTF-8 フラグの有無,
# ファイル名バイト列(16進), UTF-8 として解釈できるか, CP932 として解釈した表示,
# 正規化の比較(NFC/NFD)
import sys, struct, unicodedata
if len(sys.argv) != 2:
print("Usage: python3 check_zip_encoding.py archive.zip")
@ohton
ohton / php-build.md
Last active November 11, 2020 03:35
php-build

direnv + php-build + apache(module) (on mojave)

direnv導入 (homebrew)

brew install direnv
echo 'eval "$(direnv hook bash)"' >> ~/.bash_profile
echo 'export EDITOR=vim' >> ~/.bash_profile
. ~/.bash_profile