Skip to content

Instantly share code, notes, and snippets.

View crazy-max's full-sized avatar

CrazyMax crazy-max

View GitHub Profile
@crazy-max
crazy-max / Caddy.env
Last active February 19, 2024 13:23
Proxmox web interface through Caddy as reverse proxy with Let's Encrypt
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_HOSTED_ZONE_ID=
@crazy-max
crazy-max / README.md
Created July 9, 2023 01:36 — forked from akutz/README.md
Comparing semantic version strings in POSIX shell

Overview

The attached script provides a function for comparing semantic versions in a POSIX shell script.

Result Description
-1 A<B
0 A=B
1 A>B

Usage

@crazy-max
crazy-max / release.yml
Created December 2, 2019 09:11
Workflow to release a GitHub Action
name: release
on:
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'
jobs:
@crazy-max
crazy-max / .env
Created January 17, 2022 07:07
Speedtest + Grafana
INFLUXDB_VERSION=1.7.10
GRAFANA_VERSION=7.3.7
SPEEDTEST_VERSION=1.1.0
INFLUXDB_ADMIN_USER=
INFLUXDB_ADMIN_PASSWORD=
INFLUXDB_DB=speedtest
GF_SECURITY_ADMIN_PASSWORD=
INTERVAL=3600
@crazy-max
crazy-max / term_windows.go
Created September 27, 2021 18:24
term_windows.go
//go:build windows
// +build windows
package term
import (
"fmt"
"unsafe"
"golang.org/x/sys/windows"
@crazy-max
crazy-max / 00-dashboard.yml
Last active March 8, 2021 10:26
SysVinit conf for Traefik 2
# /etc/traefik/conf.d/00-dashboard.yml
http:
routers:
dashboard:
rule: "PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
service: "api@internal"
@crazy-max
crazy-max / ddns-route53.yml
Last active November 25, 2020 17:43
medium-ddns-route53-config
credentials:
accessKeyID: "ABCDEFGHIJKLMNO123456"
secretAccessKey: "abcdefgh123456IJKLMN+OPQRS7890+ABCDEFGH"
route53:
hostedZoneID: "ABCEEFG123456789"
recordsSet:
- name: "ddns.example.com."
type: "A"
ttl: 300
@crazy-max
crazy-max / git-empty-commit.md
Last active October 17, 2020 21:34
Create Git empty commit

In case you want to trigger an event on GitHub, you can create an empty commit:

$ git commit --allow-empty -m "Trigger event"
@crazy-max
crazy-max / move-wsl2-distro.md
Last active October 4, 2020 00:08
Move WSL2 distro

If you have a small drive on C and would like to move your WSL distro you can do it using the LxRunOffline tool.

  • Install LxRunOffline (msvc)
  • List your installed distros with LxRunOffline list command:
PS C:\> LxRunOffline list
docker-desktop-data
Ubuntu
docker-desktop