Skip to content

Instantly share code, notes, and snippets.

View danielbodnar's full-sized avatar

Daniel Bodnar danielbodnar

View GitHub Profile
@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 / arch.sh
Created March 3, 2025 15:36
proxmox.sh
#!/usr/bin/env bash
set -e
# Find next available container ID starting from 1000
function get_next_ctid() {
local NEXT_ID=1000
local EXISTING_IDS=$(pct list | tail -n +2 | awk '{print $1}')
if [ -n "$EXISTING_IDS" ]; then
local MAX_ID=$(echo "$EXISTING_IDS" | sort -n | tail -1)
@danielbodnar
danielbodnar / Jenkinsfile.json
Created April 17, 2024 04:48 — forked from JJediny/Jenkinsfile.json
JSON Schema of a Jenkinsfile (DSL Pipeline)
{
"description": "Jenkinsfile YAML",
"definitions": {
"libraries": {
"description": "One or more shared library identifiers to load",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
#!/usr/bin/env bash
set -e
ID_PREFIX="io.buildpacks.samples.stacks"
DEFAULT_PREFIX=cnbs/sample-base
DEFAULT_PLATFORM=amd64
REPO_PREFIX=${DEFAULT_PREFIX}
PLATFORM=${DEFAULT_PLATFORM}
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKWCFsxoqbgx7OTyG+leIupkbk68+fA6c78DZ1LiYhWf
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID3Ket51vJ+UlJXgLXQQpspRA8cP5Ab90kBc5EVNqVeu
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE2ybuclq+Jr7LugVa31Z6aqrVIZ/F0DO2j47QadPdKG
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDWsM8Cfbd3cuKcRICkvHVtc6ySVE2HVyJdQnzxpvloGbV7uCrY5PAZ2XJr0giFBK47At2MxC7OfO7V2thxBlLMGPm593GZXL1FIK2yju8AyaJircL226SS+4WJASRdQxNN0f9LHWEYGs5IqdtckpTgB9HIBXqahTxNr1b2DPoN3zvnBw+niYMa0w4PnyzDSCM8I94dS24covzog8Hm9GV29OhygeRPOW+tgmQcbKiu1B66c9jcu0p+l5tEIyOinVftSxXs7Jh22hN+OgpFP/c8vRJgEKZDH+Z70oDcJFAIpsyatj1rCl9aeYbHfzHB+BYinJ+rDq2aL8QK2cdbMi/thIad7JlNZiz6vJ0plG9KnIssxY2720jXvQw4qRo/867dShl3zBMmJt+Qpaw1QH5uCcysaMb3B6h0sux2wqVyxJF5wwut7AvuQpSmvwXiH2bYc03M7MnjLVyflyvyAQkFNuArXYOjQyKVha6TyQqUSW3KjEnpgdLG+YSCJvQdvtI+vlHdlpQQA0zjTzn5tTbIjJqZ3EAWYYmFJqi0bHWw6kt8beR+QrhzzN+4qv0BY6YjX7dtuMfAklcM7cjRH4iQJJs8mPon3NlzHVzrK7r+MSdD+QF6fQZxGvT2TuA8d5N97m5rB30HUFIl0TuQRNwSxOZgdahSSWrqjIqFXwDQ4Q==
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDWsM8Cfbd3cuKcRICk
@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