Skip to content

Instantly share code, notes, and snippets.

View danielbodnar's full-sized avatar
:copilot:
Engineering abstractions

Daniel Bodnar danielbodnar

:copilot:
Engineering abstractions
View GitHub Profile
@danielbodnar
danielbodnar / memory.md
Created October 26, 2025 16:47 — forked from ruvnet/memory.md
Claude Memory Template

Claude Memory Template

Copy-Paste Instructions for Optimal AI Interaction

1. Core Identity and Objective

I am [Your Name/Role], focused on:

@danielbodnar
danielbodnar / alpine-container.sh
Last active November 3, 2025 19:44 — forked from sfan5/alpine-container.sh
Create bootable systemd-nspawn containers with Alpine, Arch Linux or Ubuntu
#!/bin/bash -e
# Creates a systemd-nspawn container with Alpine
MIRROR=http://dl-cdn.alpinelinux.org/alpine
VERSION=${VERSION:-v3.22}
APKTOOLS_VERSION=2.14.9-r3
wget_or_curl () {
if command -v wget >/dev/null; then
@danielbodnar
danielbodnar / main.md
Created October 23, 2025 19:28 — forked from CaptainCrouton89/main.md
Main Output Style I Use with CC
name description
main
Tweaked for orchestration and preferred programming practices

You are a senior software architect with deep expertise in system design, code quality, and strategic agent orchestration. You provide direct engineering partnership focused on building exceptional software through precise analysis and optimal tool usage.

Core Approach

Extend Before Creating: Search for existing patterns, components, and utilities first. Most functionality already exists—extend and modify these foundations to maintain consistency and reduce duplication. Read neighboring files to understand conventions.

[Unit]
Description=Headless Chrome
Requires=network.target
After=multi-user.target
[Service]
LimitNOFILE=100
Restart=on-failure
Type=simple
@danielbodnar
danielbodnar / claude-code-prompt.txt
Created August 21, 2025 22:55 — forked from agokrani/claude-code-prompt.txt
Claude Code System Prompt
'system':
[
{
'type': 'text',
'text': "You are Claude Code, Anthropic's official CLI for Claude.",
'cache_control': {'type': 'ephemeral'}
},
{
'type': 'text',
'text': 'You are an interactive CLI tool that helps users with software engineering tasks.
@danielbodnar
danielbodnar / wget.sh
Created August 21, 2025 03:22 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@danielbodnar
danielbodnar / bash.sh
Created August 21, 2025 03:20 — forked from vielhuber/bash.sh
wget download fetch mirror scrape leech entire website locally for offline support (httrack alternative) #linux #tools
# primary
wget --mirror -p --html-extension --convert-links http://www.test.de
# alternative
wget -r --no-parent http://www.test.de
# advanced
wget --page-requisites --span-hosts --convert-links --adjust-extension --wait 1 --recursive --level 1 https://www.test.de
# recursively download ftp contents (only changes)
@danielbodnar
danielbodnar / user-defined-tcpsocket-controller-web-api.md
Created June 13, 2025 00:29 — forked from guest271314/user-defined-tcpsocket-controller-web-api.md
How to connect to a TCP server from an arbitrary Web page in the browser

Today we are going to connect to a TCP server from the browser (an arbitrary Web page).

We will be full-duplex streaming messages sent to the server and from the server to the browser.

Chrome has implemented Direct Sockets

The initial motivating use case is to support creating a web app that talks to servers and devices that have their own protocols incompatible with what’s available on the web. The web app should be able to talk to a legacy system, without requiring users to change or replace that system.

gated behind Isolated Web Apps (IWA)

@danielbodnar
danielbodnar / gist:bdd67f0ecbf142df857ab948b3a943c6
Created December 22, 2020 22:53 — forked from chrisdone/gist:02e165a0004be33734ac2334f215380e
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel