Skip to content

Instantly share code, notes, and snippets.

View gilangvperdana's full-sized avatar
Still Learning

Gilang Virga Perdana gilangvperdana

Still Learning
View GitHub Profile
gilangvperdana /
Created December 4, 2023 07:23
Auto Change Default GW Ubuntu Script
# List of gateways with corresponding interfaces
gateways=("" "" "")
interfaces=("eth0" "eth1" "eth2")
# Function to check internet connectivity using a specific interface and gateway
check_gateway_connectivity() {
gilangvperdana /
Last active November 12, 2023 06:36
Mount NFS Directory on Windows Server 2019


If you want to mount your NFS Directory to Windows Server 2019 you can follow this guide.

Install NFS Client on Windows Server

Open Powershell then execute this

Import-Module ServerManager
Install-WindowsFeature -Name FS-NFS-Service
Install-WindowsFeature NFS-Client
gilangvperdana /
Created October 22, 2023 03:50 — forked from dentechy/
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
gilangvperdana /
Created September 30, 2023 15:05
Monitoring Docker Container


Do you want to monitor your Docker Contianer on your VM/Server? You can use this method.


  • Prometheus
  • Grafana
  • Docker

Create daemon.json

  • Create daemon.json
gilangvperdana /
Created September 5, 2023 09:27 — forked from tjtanjin/
A short guide for hosting telegram bot on Ubuntu!

How to host a telegram bot on Ubuntu (18.04/20.04)


This short guide will walk you through hosting your very own telegram bot on Ubuntu (tested on Ubuntu 18.04 and 20.04)!


This guide assumes knowledge of the following:

1) Provisioning a VPS
2) Familiarity with SSH
3) Familiarity with linux command line
gilangvperdana / appsec.yaml
Created September 5, 2023 09:25
Example Manifest with Istio
View appsec.yaml
apiVersion: v1
kind: ConfigMap
name: nginx-minio-config
default.conf: |
server {
listen 80;
listen [::]:80;
server_name localhost;
gilangvperdana /
Last active November 7, 2023 13:28
Proxmox Playground


If you want to change favicon & left logo side you can replace this path

  • /usr/share/pve-manager/images/proxmox_logo.png
  • /usr/share/pve-manager/images/favicon.ico
  • /usr/share/pve-manager/images/logo-128.png

Size requirement

  • proxmox_logo.png -> 172x30
  • favicon.ico -> 32x32
  • logo-128.png -> 128x128
gilangvperdana / echo-server.yaml
Created August 3, 2023 05:05 — forked from chanjarster/echo-server.yaml
istio gateway behind nginx with SSL termination
View echo-server.yaml
apiVersion: v1
kind: Namespace
name: istio-test
istio-injection: enabled
apiVersion: v1
kind: Service
gilangvperdana /
Last active July 25, 2023 09:14
Kubectl Installation on Windows


the Kubernetes-specific command line tool that lets you communicate and control Kubernetes clusters

Download Package from CURL (Terminal)

curl.exe -LO ""

Create Env Variable

  • Assume we put config file on C:\kubectl\.kube\config
gilangvperdana /
Last active July 28, 2023 18:02
Kubeadm 2 Nodes All Role


  • 2x Ubuntu 20.04LTS
  • 2 VCPU
  • 2GB RAM
  • 50GB Storage


  • Assume node1 have IP ->

Update & Install Package