Skip to content

Instantly share code, notes, and snippets.

View lakim's full-sized avatar

Louis KIM lakim

View GitHub Profile
@lakim
lakim / agent-user-sandbox.md
Last active July 10, 2026 12:52
Agent user sandbox

Sandboxing a coding agent with a dedicated Unix user (Linux, macOS, WSL)

Objective

Run a coding agent (Claude, Opencode) as a dedicated, unprivileged Unix user so that it can only touch the files we explicitly hand it:

  • No access to your personal files — other users' home directories, dotfiles (SSH keys, shell history, GPG keys, etc.), and, on WSL, the Windows filesystem (/mnt/c, /mnt/d, …).
  • No sudo, no package installation, no system-wide changes.
  • No GitHub credentials — the agent can read and write code in its own workspace, but cannot push, pull, or open PRs. A human is always in the loop for anything that leaves the machine. To let the agent handle its own branches and PRs, loosen this with a fine-grained PAT scoped to a single repo — but it then lives inside the sandbox, so prompt injection can use it up to that scope. Keep it minimal.
@lakim
lakim / box_view_client.rb
Last active August 29, 2015 14:01
Box View API Client
module BoxView
class SessionError < StandardError; end
class GetError < StandardError; end
class RetryError < StandardError
attr_reader :retry_after
def initialize(retry_after)
@retry_after = retry_after
end
@lakim
lakim / gist:1506621
Created December 21, 2011 16:20 — forked from btoone/gist:1151748
Ubuntu Packages for Rails Hosting

One command to rule them all

sudo aptitude install apache2 apache2-prefork-dev autoconf bison build-essential \
clang curl dnsutils git-core imagemagick libc6-dev libcurl4-openssl-dev libffi-dev \
libmagickwand-dev libmysqlclient16 libmysqlclient16-dev libreadline6-dev libsqlite3-0 \
libsqlite3-dev libssl-dev libxml2 libxml2-dev libxslt-dev libxslt1.1 libxslt1-dev \
libyaml-dev mysql-client mysql-server openssl sqlite3 wget zlib1g zlib1g-dev 
@lakim
lakim / ubuntu-lucid-setup-rails.md
Created December 21, 2011 16:19 — forked from btoone/ubuntu-lucid-setup-rails.md
Ubuntu Lucid Setup Guide for Rails

This note will walk you though setting up and securing a Ubuntu 10.04 LTS then deploying a Rails application with mulit-stage deployment.

TODO:

  • Add section for NGINX setup

Server Setup