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
gilangvperdana / README.md
Created December 4, 2023 07:23
Auto Change Default GW Ubuntu Script
View README.md
#!/bin/bash
# List of gateways with corresponding interfaces
gateways=("192.168.100.1" "192.168.70.1" "192.168.80.1")
interfaces=("eth0" "eth1" "eth2")
# Function to check internet connectivity using a specific interface and gateway
check_gateway_connectivity() {
interface=$1
gateway=$2
@gilangvperdana
gilangvperdana / README.md
Last active November 12, 2023 06:36
Mount NFS Directory on Windows Server 2019
View README.md

General

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
gilangvperdana / WSL-ssh-server.md
Created October 22, 2023 03:50 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux
View WSL-ssh-server.md

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
gilangvperdana / README.md
Created September 30, 2023 15:05
Monitoring Docker Container
View README.md

General

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

Prerequisites

  • Prometheus
  • Grafana
  • Docker

Create daemon.json

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

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

Introduction

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

Prerequisites

This guide assumes knowledge of the following:

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

General

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
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
metadata:
name: istio-test
labels:
istio-injection: enabled
---
apiVersion: v1
kind: Service
metadata:
@gilangvperdana
gilangvperdana / README.md
Last active July 25, 2023 09:14
Kubectl Installation on Windows
View README.md

Kubectl

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

Download Package from CURL (Terminal)

curl.exe -LO "https://dl.k8s.io/release/v1.27.3/bin/windows/amd64/kubectl.exe"

Create Env Variable

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

Prerequisites

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

Assume

  • Assume node1 have IP -> 10.10.10.247

Update & Install Package