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 / 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
@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

@danielbodnar
danielbodnar / Background_set.ps1
Created March 25, 2020 02:16
WRS: Windows Reproducible Script. `Apps_install.ps1` -> `Background_set.ps1 -> `Console_config.ps1` -> `Default.cmd`.
<#PSScriptInfo
.VERSION 1.0.0.0
.GUID 084a184a-faa1-47e4-9f1a-5d9ecede68c3
.AUTHOR Jeffrey Snover
.COMPANYNAME
@danielbodnar
danielbodnar / windows_hardening.cmd
Created March 25, 2020 02:09 — forked from ricardojba/windows_hardening.cmd
A Windows hardening script
::###############################################################################################################
:: Credits and More info: https://gist.github.com/mackwage/08604751462126599d7e52f233490efe
:: https://github.com/api0cradle/LOLBAS
:: https://github.com/Disassembler0/Win10-Initial-Setup-Script
:: https://github.com/cryps1s/DARKSURGEON/tree/master/configuration/configuration-scripts
:: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1#file-reclaimwindows10-ps1-L71
::
::###############################################################################################################
:: Change file associations to protect against common ransomware attacks
:: Note that if you legitimately use these extensions, like .bat, you will now need to execute them manually from cmd or powershell
@danielbodnar
danielbodnar / reversecmd.go
Created December 22, 2019 23:47 — forked from yougg/reversecmd.go
Golang reverse shell
// +build windows
// Reverse Windows CMD
// Test with nc -lvvp 6666
package main
import (
"bufio"
"net"
"os/exec"
@danielbodnar
danielbodnar / zfsinstall-1-setup.sh
Created October 23, 2019 19:59 — forked from johnramsden/zfsinstall-1-setup.sh
Install scripts for installing Arch Linux on ZFS. Not runnable, just listed commands.
#!/bin/bash
# Check before running, may need intervention
# Pass in the following to the script, or hardcode it.
# Uncomment if hardcoding input.
BOOT_PARTITION="/dev/sdg1"
DISK_1="ata-SanDisk_SDSSDXPS480G_152271401093"
DISK_2="ata-SanDisk_SDSSDXPS480G_154501401266"
POOL="vault"