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
@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/*
@ichux
ichux / savetar
Last active February 17, 2026 05:19
docker save \
fanout/pushpin:1.41.0 \
zeromq:latest \
haproxy:3.3.0 \
mariadb:12.1.2-noble \
redis/redis-stack \
-o bittonet.tar
docker load -i ~/bittonet.tar
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).
@ichux
ichux / steps.txt
Last active November 8, 2025 00:29
Decompiling .apk files
# install decompiler
brew install dex2jar; brew install jadx; brew install apktool; brew cask install jd-gui
Forum:= https://groups.google.com/forum/#!forum/android-platform
Config:= java -Xmx512m
Download from:= https://bitbucket.org/mstrobel/procyon/downloads/
USING apktool
1. apktool d sample_app.apk -o apktool_sample_app