Skip to content

Instantly share code, notes, and snippets.

@hunzo
hunzo / install.sh
Created September 20, 2024 04:02
install k3s
#!/bin/bash
# install k3s
curl -sfL https://get.k3s.io | sh -
# add auto completion
echo 'alias kubectl="sudo k3s kubectl"' >> ~/.bashrc
echo 'alias k="kubectl"' >> ~/.bashrc
echo "source <(kubectl completion bash)" >> ~/.bashrc
echo "complete -o default -F __start_kubectl k" >> ~/.bashrc
@hunzo
hunzo / main.go
Created September 19, 2024 08:07
fix error "431 Request Header Too Large" in golang fiber
package main
import (
"github.com/gofiber/fiber/v2"
)
func main() {
app := fiber.New(fiber.Config{
// Default is 8192 (8 KB), you can increase it to a higher value
ReadBufferSize: 16 * 1024, // 16 KB, increase as needed
@hunzo
hunzo / compose.yaml
Created September 16, 2024 06:40
kong startup
services:
kong-db:
image: postgres:9.6-alpine
container_name: kong-db
restart: always
environment:
- POSTGRES_DB=kong
- POSTGRES_USER=kong
- POSTGRES_PASSWORD=kong
healthcheck:
@hunzo
hunzo / compose.yaml
Last active September 13, 2024 05:47
keycloak docker revers proxy
services:
keycloak:
image: quay.io/keycloak/keycloak:latest
ports:
- 8080:8080
# - 9000:9000 # management interface
restart: always
environment:
- TZ=Asia/Bangkok
- KEYCLOAK_ADMIN=admin
@hunzo
hunzo / create-mikrotik-chr-template.sh
Created September 2, 2024 09:10
Mikrotik CHR on Proxmox
#!/bin/bash
wget "https://download.mikrotik.com/routeros/7.15.3/chr-7.15.3.img.zip"
apt install unzip -y
unzip chr-7.15.3.img.zip
qm create 940 --name "temp-mikrotik-ros-7.15.3" --ostype l26
qm set 940 --net0 virtio,bridge=vmbr0
qm set 940 --serial0 socket --vga serial0
qm set 940 --memory 256 --cores 2 --cpu host
qm set 940 --scsi0 local-lvm:0,import-from="$(pwd)/chr-7.15.3.img",discard=on
qm set 940 --boot order=scsi0 --scsihw virtio-scsi-single
@hunzo
hunzo / install.sh
Created August 30, 2024 02:17
my installer
#!/bin/bash
# install list
# - Golang
# - Python
# - Python-venv
# - Node Version Manager (nvm)
GO_VERSION=go1.22.6
NVIM_VERSION=v0.10.1
NVM_VERSION=v0.40.0
@hunzo
hunzo / .env
Created August 28, 2024 06:18
directus with ldap authentication
AUTH_PROVIDERS="ldap"
AUTH_LDAP_DRIVER="ldap"
AUTH_LDAP_CLIENT_URL="ldap://ldap_ip_address"
AUTH_LDAP_USER_DN="string:DC=domain,DC=local"
AUTH_LDAP_AUTO_CREATE_USER="true"
AUTH_LDAP_USER_SCOPE="sub"
AUTH_LDAP_BIND_DN="string:CN=bind_users,OU=users,DC=domain,DC=local"
AUTH_LDAP_BIND_PASSWORD="bind_user_password"
AUTH_LDAP_USER_ATTRIBUTE="userPrincipalName"
@hunzo
hunzo / alacritty.toml
Last active August 25, 2024 03:39
alacrittty config
import = [
"~/.config/alacritty/themes/themes/ayu_dark.toml"
]
[window]
opacity = 0.8
padding.x = 10
padding.y = 10
@hunzo
hunzo / readme.md
Created August 21, 2024 05:40
export vmware ova from powershell
Connect-VIServer vcenter-server.net.local
Get-Mm your-vm-name* | Export-VApp -Format Ova -Destination D:\vmware-ova
@hunzo
hunzo / readme.md
Last active August 21, 2024 05:38
Install Oracle Linux 6.8

Install Oracle Linux 6.8

Install Software List from GUI

Base System > Base
Base System > Client management tools
Base System > Compatibility libraries
Base System > Hardware monitoring utilities
Base System > Large Systems Performance
Base System &gt; Network file system client