Skip to content

Instantly share code, notes, and snippets.

View sinabahram's full-sized avatar

Sina Bahram sinabahram

View GitHub Profile
@sinabahram
sinabahram / claudebox-wsl2-root-fix.md
Created August 30, 2025 18:36
ClaudeBox WSL2 Root User Support - Fix for Docker build failure with UID 0

ClaudeBox WSL2 Root User Fix

This gist contains the necessary changes to support running ClaudeBox as root (UID 0) in WSL2.

File 1: build/Dockerfile

Key changes:

  • Lines 29-40: Handle user creation when UID=0 by creating symlink instead
  • Lines 48-53: Create helper script for conditional command execution
  • Throughout: Use helper script for user-context commands
@sinabahram
sinabahram / gist:1f59668c849c78d138445c266f1032c0
Created April 4, 2017 17:41
SQL to Return Rows within 95th Percentile
SELECT CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(GROUP_CONCAT(field_name ORDER BY field_name SEPARATOR ','),  ',', 95/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS `95th Per` FROM table_name;