Skip to content

Instantly share code, notes, and snippets.

server {
    server_name s3.domain.id;
    client_max_body_size 256M;
    location / {
        max_ranges 0;
        proxy_pass http://10.10.10.1:9000;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header X-Forwarded-Proto $scheme;
wget https://dl.min.io/server/minio/release/linux-amd64/minio
mv minio /usr/local/bin

useradd -r minio-user -s /sbin/nologin
chown minio-user:minio-user /usr/local/bin/minio

mkdir -p /data/minio
chown minio-user:minio-user /data/minio
@mb00g
mb00g / Indonesia Speedtest Server ID.md
Created January 28, 2021 03:21
Indonesia Speedtest Server ID
KOTA SPONSOR ID HOST
Jogjakarta Lungit Inc 11151 speedtest.lungit.com:8080
Jogjakarta citranet 12532 speedtest.jogja.citra.net.id:8080
Yogyakarta Universitas Negeri Yogyakarta 8042 sp.uny.ac.id:8080
Yogyakarta Universitas Gadjah Mada 8922 speedtest.ugm.ac.id:8080
Yogyakarta PT Union Routelink Communication 24587 speedtest.routelink.net.id:8080
Yogyakarta CitraNet 6910 speedtest.citra.net.id:8080
Yogyakarta GMedia Technologies 7106 speedtestyk1.gmedia.net.
@mb00g
mb00g / minikube_proxy.md
Created November 30, 2020 05:53
minikube_proxy
kubectl proxy --address='0.0.0.0' --disable-filter=true

Login Mikrotik hotspot via CLI RouterOS

Login

/tool fetch http-method=post http-data="username=j53t6p&password=j3rc" url=("http://belokin.com/login\?dst=http://172.16.115.1") keep-result=yes

Logout

/tool fetch http-method=post url=("http://belokin.com/logout") keep-result=yes

Use the following to configure PostgreSQL and Keycloak. The key is to run this against a stopped Keycloak (using a fresh install). Save the below to something like setup-keycloak.cli:

embed-server --server-config=standalone.xml --std-out=echo

batch
#
# remove the default provided datasource
#
/subsystem=datasources/data-source=KeycloakDS/:remove

Sample toolchain file for building for ARM from an Ubuntu Linux system. Typical usage:

  • install cross compiler: sudo apt-get install gcc-arm-linux-gnueabi
  • cd build
  • cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-Ubuntu-gnueabi.cmake ..

cat ~/Toolchain-Ubuntu-gnueabi.cmake

Tweak Gluster Volume dengan nama moodle

gluster volume set moodle performance.cache-max-file-size 256MB
gluster volume set moodle performance.cache-size 8192MB
gluster volume set moodle performance.write-behind-window-size 8MB
gluster volume set moodle performance.stat-prefetch on
gluster volume set moodle client.event-threads 8
gluster volume set moodle server.event-threads 8
gluster volume set moodle performance.flush-behind on
@mb00g
mb00g / hap_web_vhost_ssl.md
Last active October 7, 2020 04:04
Config HAProxy dengan SSL & vhost support

Generate new cert menggunakan certbot https://certbot.eff.org/all-instructions

Gabungkan fullchain.pem dan privkey.pem

cat /etc/letsencrypt/live/student.domain.id/fullchain.pem /etc/letsencrypt/live/student.domain.id/privkey.pem | tee /etc/ssl/private/student.domain.id.pem

Buat file /etc/ssl/private/crt-list.txt dengan isi path ke file .pem hasil gabungan

$ cat /etc/ssl/private/crt-list.txt
global_defs {
        notification_email {
            fajar at bla bla bla
        }
        notification_email_from [email protected]
        smtp_server 127.0.0.1
        smtp_connect_timeout 30
    }