Skip to content

Instantly share code, notes, and snippets.

View krzko's full-sized avatar
⚔️
I’m rubber, you’re glue

Kristof Kowalski krzko

⚔️
I’m rubber, you’re glue
View GitHub Profile
@krzko
krzko / CloudConfig.md
Created April 16, 2026 04:36 — forked from OnSive/CloudConfig.md
My Hetzner Cloud Config (cloud-init)

What is Hetzner cloud config? https://community.hetzner.com/tutorials/basic-cloud-config

An additional feature during creation of a Hetzner cloud server (CX11 and above) is user data.
This allows the execution of a cloud-init configuration for the newly created server.

How to use:

  1. Replace both {username} with the username of your choise and remove both <--- Insert username
  2. Replace ssh-rsa AAA...0w== with your public ssh key and remove the <--- Insert public ssh key
  3. Copy & Paste your config in the Cloud-init configuration field at the bottom of the create server dialogue.

My cloud config does the following:

  • Creates a new user as admin and docker user and disables the need for a password on sudo ....
import argparse
import math
import textwrap
from datetime import timedelta
DURATIONS = {"s": 1, "m": 60, "h": 3600, "d": 86400, "w": 604800}
ERROR_RATES = [
0.0001,
0.0005,
0.001,
@krzko
krzko / Domain Enumeration Commands
Created March 24, 2022 11:06 — forked from its-a-feature/Domain Enumeration Commands
Common Domain Enumeration commands in Windows, Mac, and LDAP
Domain: TEST.local
User Enumeration:
Windows:
net user
net user /domain
net user [username]
net user [username] /domain
wmic useraccount
Mac:
dscl . ls /Users
@krzko
krzko / script-template.sh
Created May 17, 2021 10:05 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@krzko
krzko / 0_reuse_code.js
Created September 27, 2013 01:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console