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 / 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 / .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 / 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
name: lint
on:
pull_request:
paths:
- '.github/workflows/lint.yml'
- 'src/*'
jobs:
lint:
@crazy-max
crazy-max / issues.yml
Last active May 26, 2020 22:20
bdougieYo Issues Grab
name: issues
on:
push:
jobs:
generate:
runs-on: ubuntu-latest
steps:
-
name: build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Check GitHub Status