Skip to content

Instantly share code, notes, and snippets.

View reski-rukmantiyo's full-sized avatar

Reski Rukmantiyo reski-rukmantiyo

View GitHub Profile
@reski-rukmantiyo
reski-rukmantiyo / haproxy.log
Created September 22, 2022 00:30
benthos config
http:
enabled: true
address: 0.0.0.0:1023
root_path: /benthos
debug_endpoints: false
cert_file: ""
key_file: ""
cors:
enabled: false
allowed_origins: []
version: '3'
volumes:
mysql_data:
driver: local
services:
mysql:
image: mysql:5.7
volumes:
@reski-rukmantiyo
reski-rukmantiyo / k3s_on_alpine.md
Created February 19, 2022 03:04 — forked from ruanbekker/k3s_on_alpine.md
Install k3s on Alpine Linux
$ apk add --no-cache curl
$ echo "cgroup /sys/fs/cgroup cgroup defaults 0 0" >> /etc/fstab

$ cat > /etc/cgconfig.conf <<EOF
mount {
  cpuacct = /cgroup/cpuacct;
  memory = /cgroup/memory;
  devices = /cgroup/devices;
  freezer = /cgroup/freezer;
@reski-rukmantiyo
reski-rukmantiyo / docker-compose.yml
Last active January 30, 2022 05:54
Thingsboard Trendz
version: '3.4'
services:
mytrendz:
restart: always
image: "thingsboard/trendz:latest"
container_name: mytrendz
ports:
- "8888:8888"
environment:
TB_API_URL: http://182.23.67.112:8080
@reski-rukmantiyo
reski-rukmantiyo / WSL2 Cheat Sheet.md
Last active January 5, 2022 00:06
WSL 2 Cheat Sheet

WSL2 sometimes need to sync time after windows sleep

sudo ntpdate pool.ntp.org
@reski-rukmantiyo
reski-rukmantiyo / check-config.sh
Last active December 13, 2021 22:55
Script to Install Docker
curl -L0 https://github.com/moby/moby/blob/master/contrib/check-config.sh > check-config.sh
chmod +x check-config.sh
./check-config.sh
@reski-rukmantiyo
reski-rukmantiyo / Install Mosquitto MQTT.txt
Last active August 23, 2021 14:54
Integrasi Zigbee2MQTT to HA
Instalasi
------------------------
sudo mkdir docker-mosquitto
cd docker-mosquitto
sudo mkdir mosquitto
sudo mkdir mosquitto/config/
sudo mkdir mosquitto/data/
sudo mkdir mosquitto/log/
sudo touch mosquitto/config/mosquitto.conf
@reski-rukmantiyo
reski-rukmantiyo / const.py
Created July 4, 2021 11:11
Xiaomi MIIO Air Purifier 3C : Hassio 2021.6.6
"""Constants for the Xiaomi Miio component."""
DOMAIN = "xiaomi_miio"
CONF_FLOW_TYPE = "config_flow_device"
CONF_GATEWAY = "gateway"
CONF_DEVICE = "device"
CONF_MODEL = "model"
CONF_MAC = "mac"
KEY_COORDINATOR = "coordinator"
@reski-rukmantiyo
reski-rukmantiyo / snapd.sh
Created May 12, 2021 13:15
WSL2 + Snap Installation
# Taken from https://github.com/microsoft/WSL/issues/5126#issuecomment-653715201
sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
snap version
@reski-rukmantiyo
reski-rukmantiyo / go-build-all.sh
Created April 8, 2021 16:56 — forked from makew0rld/go-build-all.sh
Cross compile for all possible Golang targets. This script will always be updated, because it uses the `go` command to see what can be built.
#!/usr/bin/env bash
# Based on https://gist.github.com/eduncan911/68775dba9d3c028181e4
# but improved to use the `go` command so it never goes out of date.
type setopt >/dev/null 2>&1
contains() {
# Source: https://stackoverflow.com/a/8063398/7361270
[[ $1 =~ (^|[[:space:]])$2($|[[:space:]]) ]]