Skip to content

Instantly share code, notes, and snippets.

View LaurenceJJones's full-sized avatar
🦙

Laurence Jones LaurenceJJones

🦙
View GitHub Profile
@LaurenceJJones
LaurenceJJones / go_setup.sh
Last active May 2, 2025 08:44
Script to automatically download golang version
#!/bin/bash
VERSION=${VERSION:-1.24.2}
# Detect OS platform amd64
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | tr '[:upper:]' '[:lower:]')
if [ "$ARCH" = "x86_64" ]; then
ARCH="amd64"
fi
# Detect OS platform arm64
if [ "$ARCH" = "aarch64" ]; then
@LaurenceJJones
LaurenceJJones / crowdsec-lights.sh
Last active June 12, 2023 19:31
crowdsec lights
#!/bin/bash
### Prequesites
## jq curl
###
### Variables
LAPI="http://127.0.0.1:8080"
ORIGINS="crowdsec,cscli" ## Comma separated list of ORIGINS ## Dont include CAPI as capi will flush every 2 hours and will make your lights go wild
API_KEY=""
@LaurenceJJones
LaurenceJJones / debian_update_symlinks.sh
Last active September 26, 2024 10:59
crowdsec debian symlinks
@LaurenceJJones
LaurenceJJones / re2_init.sh
Created August 9, 2023 11:15
RE2 compile from source: tested debian
#!/bin/bash
RE2_VERSION=${RE2_VERSION:-2023-03-01}
## Utilities ##
download() {
if [ -z "$1" ]; then
echo "download() requires a URL as first argument"
exit 1
fi