Skip to content

Instantly share code, notes, and snippets.

View tarekrached's full-sized avatar

Tarek Rached tarekrached

View GitHub Profile
@tarekrached
tarekrached / test-sandboxer-fd.sh
Created April 13, 2026 20:44
Repro script for pantsbuild/pants#23169 — verifies sandboxer daemon FD redirection
#!/bin/bash
# Repro script: checks what FD 1 the sandboxer daemon gets under different stdout contexts.
# Must be run with PANTS_SANDBOXER=true in the environment.
# Adapted from the reproduction in https://github.com/pantsbuild/pants/issues/23169
cd ~/3p-code/pants
cleanup() {
pkill -9 -f "sandboxer.*socket-path" 2>/dev/null
pkill -9 -f pantsd 2>/dev/null
@tarekrached
tarekrached / sync-name.sh
Created April 11, 2026 20:22
Sync Claude Code session name to agent-deck session title via hooks
#!/usr/bin/env bash
# Syncs Claude Code session name to agent-deck session title.
#
# Registered as an async hook on frequent events (UserPromptSubmit, Stop,
# SessionStart). On each invocation it:
# 1. Reads session_id from the hook's stdin JSON
# 2. Finds the matching PID file in ~/.claude/sessions/
# 3. Reads the "name" field (set by --name or /rename)
# 4. If it differs from the current agent-deck title, updates it
#
@tarekrached
tarekrached / prune_playwright_v2.py
Created November 21, 2025 00:03
Prune playwright MCP commands from Claude history JSONL files while maintaining referential integrity
#!/usr/bin/env python3
"""Prune playwright MCP commands and responses from Claude history while maintaining referential integrity."""
import argparse
import json
import shutil
from pathlib import Path
def main():
@tarekrached
tarekrached / index.html
Last active April 4, 2018 21:35
walkme-bug-repro
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
@tarekrached
tarekrached / migrate-redis.py
Created September 5, 2017 21:01 — forked from thomasst/migrate-redis.py
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
@tarekrached
tarekrached / .block
Created July 31, 2017 21:54 — forked from mbostock/.block
Circle Wave
license: gpl-3.0
border: no
@tarekrached
tarekrached / .block
Last active September 10, 2016 02:22 — forked from mbostock/.block
Projection Transitions
license: gpl-3.0
@tarekrached
tarekrached / .block
Created September 9, 2016 17:55 — forked from mbostock/.block
Choropleth
license: gpl-3.0
height: 600
border: no

Keybase proof

I hereby claim:

  • I am tarekrached on github.
  • I am tarekrached (https://keybase.io/tarekrached) on keybase.
  • I have a public key ASBH1dxS-qobyJpXVDPjYdHT-asQ8izLqpl3cTAe_CXdPAo

To claim this, I am signing this object:

@tarekrached
tarekrached / d3.json
Created October 14, 2015 05:37 — forked from emeeks/d3.json
Orbital Layout of D3.js API
{
"name": "d3",
"children": [
{"name": "version"},
{"name": "ascending"},
{"name": "descending"},
{"name": "min"},
{"name": "max"},
{"name": "extent"},
{"name": "sum"},