Skip to content

Instantly share code, notes, and snippets.

View kahidna's full-sized avatar

Kun Alfin Hidayat kahidna

View GitHub Profile
@kahidna
kahidna / bench.sh
Last active February 21, 2026 12:20
benchmark jitsi web performance, make sure your jitsi doesn't require auth first
#!/bin/bash
# Default values
default_sessions=1
default_tabs_per_session=2
default_url="https://puturljitsiwebhere.domain/benchmarkJitsiRoom"
# Parse command line arguments
while getopts ":s:t:f:" opt; do
case $opt in
@kahidna
kahidna / assign-ip-gw-dns.md
Last active May 23, 2025 00:42
command line in linux to assign IP, gateway and DNS server

assign temporal IP using commandline instead config file

Make sure your Linux have ifconfig binary commands first.
Define the IP and the netmask. for example

ifconfig eth0 192.168.104.158 netmask 255.255.255.0

Find your gateway of your network, and then add the gateway IP

@kahidna
kahidna / .vimrc
Last active January 3, 2026 13:26
Setup vim as simple and useful editor or IDE on Linux server.
call plug#begin()
Plug 'mhartington/oceanic-next'
Plug 'vim-airline/vim-airline'
Plug 'preservim/nerdtree'
Plug 'dense-analysis/ale'
Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'npm ci'}
call plug#end()
syntax on
set mouse-=a
set number
@kahidna
kahidna / docker-swarm-cheat-sheet.md
Last active August 23, 2023 14:37
your friendly quick start learn and cheat sheet how to use docker swarm

prepare nodes

operating system debian 11, with docker ce installed version 20.10.20. the manager have 1 NIC, 1 vcpu, 2gb ram and 50gb storage the worker have have 1 NIC, 2 vcpu, 2gb ram and 50gb storage

role vCPU RAM (GB) Disk (GB) NIC
manager 1 2 50 1
worker-1 2 2 50 1
worker-2 2 2 50 1
@kahidna
kahidna / commands.vim
Created November 16, 2022 02:13 — forked from eddking/commands.vim
Vim normal mode commands as a Unite.vim menu
let g:unite_source_menu_menus.commands.command_candidates = [
\['▷ record a macro q', 'normal q' ],
\['▷ move forward one word w', 'normal w' ],
\['▷ move to the end of the prev word e', 'normal e' ],
\['▷ replace the character underneath the cursor r', 'normal r' ],
\['▷ move forward till the next character typed t', 'normal t' ],
\['▷ yank/copy y', 'normal y' ],
\['▷ undo u', 'normal u' ],
\['▷ enter insert mode i', 'normal i' ],
\['▷ open a new line underneath the current li
@kahidna
kahidna / create-certificate-for-keystore.md
Last active August 25, 2022 21:30
fast way create self signed certificate and how to verified it

Generate java keystore for server side, in this case, this certificate is for kafka

this step created using java 8 jdk. if you already have Certificate Authority (CA) files, then you can skip this step

Generate the CA files

modify the value and then export the variables

export C=ID
export ST=Yogyakarta
export L=Yogyakarta
export O=TLab
export OU=Infra
@kahidna
kahidna / docker-compose.yml
Created August 13, 2022 23:10
traefik as reverse proxy and ssl termination on docker compose deployment
version: '3.5'
services:
traefik:
image: "traefik:v2.6"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
@kahidna
kahidna / Dockerfile
Created March 16, 2022 00:09 — forked from bskaggs/Dockerfile
Install pyarrow on alpine in docker
FROM python:3.7-alpine3.8
RUN apk add --no-cache \
build-base \
cmake \
bash \
jemalloc-dev \
boost-dev \
autoconf \
zlib-dev \
@kahidna
kahidna / 00-installer-config.yaml
Created November 26, 2021 12:00
ubuntu netplan sample config and explaination. if not installed you can install using command apt-get install netplan.io
# This is the network config written by 'subiquity'
network:
ethernets:
ens18: # adjust with your interface id from command ip a
addresses:
- 192.168.200.167/24 # ip address and subnetmask
nameservers:
addresses:
- 8.8.8.8 # dns ip address
- 1.1.1.1
@kahidna
kahidna / docker-compose-nfs.yml
Last active November 16, 2022 16:03
docker compose using nfs v4 as volume
version: '3.5'
services:
nfs-server:
image: 'itsthenetwork/nfs-server-alpine:4'
container_name: nfs
hostname: nfs
ports:
- 2049:2049
environment:
- SHARED_DIRECTORY=/nfsshare