Skip to content

Instantly share code, notes, and snippets.

View ichux's full-sized avatar
🏠
Working from home

Chukwudi Nwachukwu ichux

🏠
Working from home
View GitHub Profile
tmux new-session -d -s publisher \
'TEST_SCROLL_TEXT_INTERVAL=45 /home/iam/devcode/.env/airbits/bin/python3 -u ~/devcode/airbits/zmq-pubsub-bridge/bridge2/publisher.py'
PY=/home/iam/devcode/.env/markdown/bin/python3
$PY ~/Documents/vitalmd/convert_source_to_pdf.py -f scripts/notify_push_demo.py
@ichux
ichux / opencode
Last active August 13, 2026 06:21
opencode session list 2>&1 | head -20; echo ===; opencode db path 2>&
To continue this exact session (the one you exported):
opencode --session ses_00a9152b4ffehE1UW2JL7JSzoY
or shorthand for last session:
opencode -c
And --fork creates a fresh session continuing from it without modifying the original:
opencode --session ses_00a9152b4ffehE1UW2JL7JSzoY --fork
import json
import subprocess
import sys
def get_metadata_ffprobe(file_path):
cmd = [
"ffprobe",
"-hide_banner",
"-v",
@ichux
ichux / startup_disk_creator.txt
Created April 27, 2026 07:22
Startup Disk Creator
sudo apt install -y usb-creator-gtk
docker save zeromq:latest -o /tmp/zeromq.tar
google-chrome --user-data-dir=~/.cache/chrome-devtools-mcp/chrome-profile
sudo truncate -s 0 /var/log/emoncms/file1.log
sudo truncate -s 0 /var/log/emoncms/apache2-error.log
# remove chromemcp data
rm -rf ~/.cache/chrome-devtools-mcp/chrome-profile/*
sudo echo $USER' ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/$USER && sudo chmod 0440 /etc/sudoers.d/$USER
@ichux
ichux / twrap.py
Created January 9, 2026 14:39
text wrap
import textwrap
def format_string(data, chunk_size=73, indent=4, return_output=False):
"""
Format a string into chunks of specified size using textwrap, with optional indentation.
Args:
data: Input string to be formatted.
chunk_size: Size of each chunk (default: 73).
indent: Number of spaces for indentation (default: 4).
return_output: If True, return the formatted string instead of printing (default: False).
python3 << 'EOF'
import ast
import sys
file_path = "~/test_clinical_study.py"
with open(file_path, 'r') as f:
tree = ast.parse(f.read(), filename=file_path)
imported = set()