Skip to content

Instantly share code, notes, and snippets.

View AasSuhendar's full-sized avatar
🎯
Focusing

Aas Suhendar AasSuhendar

🎯
Focusing
View GitHub Profile
@AasSuhendar
AasSuhendar / rancher-url-change.md
Created November 15, 2021 11:17 — forked from janeczku/rancher-url-change.md
Change the hostname/URL and certificate of an existing Rancher installation

Steps to change the URL of Rancher installation and switch from a self-signed certificate to a certificate signed by recognized CA.

  1. Change the Rancher server-url setting to the new URL:
    • Navigate to https://<old_rancher_hostname>/g/settings/advanced
    • Edit server-url to https://<new_rancher_hostname>
  2. Clear the private CA certificate for the old certificate
    • Navigate to https://<old_rancher_hostname>/g/settings/advanced
    • Next to cacerts click context menu -> View in API
    • Click Edit
    • Clear the content of the value field
#!/bin/bash
# Check Privileges
if [[ $UID -ne 0 ]]; then
echo "Administrator Privilege Needed. Please run as An Administrator/Root User!"
exit 1
fi
# Enable Sysctl Tweaks
cat << EOF >> /etc/sysctl.conf
@AasSuhendar
AasSuhendar / README-setup-tunnel-as-systemd-service.md
Created September 19, 2021 06:35 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@AasSuhendar
AasSuhendar / nginx-tuning.md
Created September 19, 2021 06:23 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@AasSuhendar
AasSuhendar / linux-tcp.txt
Created September 19, 2021 05:56 — forked from maxp/linux-tcp.txt
Tuning the Linux Kernel for many tcp connections
Put these in /etc/sysctl.conf then run sysctl -p to apply them.
# General gigabit tuning:
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_syncookies = 1
# this gives the kernel more memory for tcp
@AasSuhendar
AasSuhendar / cheetsheet_oc_command.md
Last active July 8, 2020 09:24
Daily Commands on OpenShift

Daily Commands on OpenShift

Client

Initial Client Setup

oc login [url of console openshift]
Authentication required for https://console.example.id:443 (openshift)
Username: admin
Password:
@AasSuhendar
AasSuhendar / jitsi.md
Last active April 27, 2020 15:46
This is note to setup Jitsi on Ubuntu 18.04

Setup Jitsi for WebRTC Video Conference

Setup Jitsi Meet for WebRTC Video Conference in your own on-premises, cloud, or dedicated servers.

Preparation

OS Preparation

sudo su # escelate privileged to root
apt-get update && apt-get dist-upgrade -y # upgrade OS distribution
@AasSuhendar
AasSuhendar / icinga2-setup.md
Last active June 23, 2020 07:53
Icinga2 Setup Guide

Setup Icinga2

Icinga is a monitoring system which checks the availability of your network resources, notifies users of outages, and generates performance data for reporting. Icinga 2 is the monitoring server and requires Icinga Web 2 on top in your Icinga Stack.

This document will guide you to provision and installing Icinga2 with:

  1. Master Node
  2. Agent Node
@AasSuhendar
AasSuhendar / .zshrc
Created November 14, 2019 03:57
ZSHRC
# Customise the Powerlevel9k prompts
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
# context
dir
# custom_javascript
vcs
# newline
)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
@AasSuhendar
AasSuhendar / MongoCLI.md
Created September 11, 2019 16:39
MongoCLI Tools Dump and Restore daily used

MongoCLI Tools Dump and Restore

Dump and Restore

Pure Dump

mongodump -u [user] -p [pass] --db [dbname] --out [path-file]

Pure Restore