Skip to content

Instantly share code, notes, and snippets.

@dot-mike
dot-mike / README.md
Last active January 20, 2025 21:49 — forked from travelhawk/README.md
Use vagrant and ansible on Windows (WSL2)

Use vagrant and ansible on Windows (WSL2)

Making Vagrant and Virtualbox installed on Windows as a provider is not well documented across the documentations. This document outlines how to set this up.

Requirements

  • Windows 11
  • Virtualbox
  • WSL2
@dot-mike
dot-mike / caddy_ubuntu.sh
Last active July 5, 2024 23:25 — forked from abhishek77in/caddy_ec2_ubuntu22_04.sh
Script to install caddy
#!/bin/bash
sudo apt update
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
sudo tee /etc/caddy/Caddyfile > /dev/null <<EOF
yourdomain.com {
reverse_proxy localhost:7860
@dot-mike
dot-mike / squid-plus-mikrotik.txt
Created May 6, 2024 14:54 — forked from riipandi/squid-plus-mikrotik.txt
Squid Proxy & Mikrotik Setup Script
http://ictsentani.org/?p=258
http://opensource.telkomspeedy.com/forum/viewtopic.php?pid=122506
#-------------------------------------------------------------------------------
E1 Modem1 : 192.168.77.1 -> IP Modem1 : 192.168.77.2
E2 Server : 192.168.88.1 -> IP Server : 192.168.88.2
E3 Hotspot : 192.168.99.1 -> IP Hotspot : 192.168.99.10 - 192.168.99.250
E4 Labkom : 10.10.10.254 -> IP Labkom : 10.10.10.1 - 10.10.10.20
#-------------------------------------------------------------------------------
@dot-mike
dot-mike / extract_zst.py
Created November 21, 2023 20:46 — forked from scivision/extract_zst.py
Extract a .zst file in Python
from pathlib import Path
import tempfile
import tarfile
import zstandard
# pip install zstandard
def extract_zst(archive: Path, out_path: Path):
"""extract .zst file
@dot-mike
dot-mike / gpg-ssh-setup.md
Created July 2, 2023 13:54 — forked from mcattarinussi/gpg-ssh-setup.md
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.