Skip to content

Instantly share code, notes, and snippets.

Avatar
🎓
Still Learning

Gilang Virga Perdana gilangvperdana

🎓
Still Learning
View GitHub Profile
@imsmith
imsmith / create-cloud-template.sh
Created Apr 6, 2021 — forked from chriswayg/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
View create-cloud-template.sh
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@williamgh2019
williamgh2019 / VMware Workstation Pro 16 full license keys
Last active Dec 3, 2022
Free VMware Workstation Pro 16 to 16.1.1 full license keys with tested (updated with latest verion)
View VMware Workstation Pro 16 full license keys
Install new VMware Workstation Pro 16 or upgrade from 15 by download below as trial version first:
https://www.vmware.com/products/workstation-pro/workstation-pro-evaluation.html
After install or upgrade just insert the key and enjoy.
*No virus
*No spam just license key
ZF3R0-FHED2-M80TY-8QYGC-NPKYF --->> This key is 100% worked for me up to VM 16.1.1 build-17801498
YF390-0HF8P-M81RQ-2DXQE-M2UT6
@smijar
smijar / k3d-create-cluster-no-traefik.sh
Last active Oct 27, 2022
k3d create cluster without traefik and serverlb
View k3d-create-cluster-no-traefik.sh
# Possibly obsolete: k3d create --name testcls1 --workers 3
k3d create --name testcls1 --workers 3 --server-arg "--no-deploy=traefik" --server-arg "--no-deploy=servicelb"
# UPDATE: in newer versions onwards, this has evolved to (thanks to comments below):
k3d cluster create --k3s-arg "--no-deploy=traefik@server:*"
@johnhpatton
johnhpatton / ephemeral-port-details.sh
Created Jan 29, 2020
Get TCP ephemeral port details to validate ephemeral port exhaustion.
View ephemeral-port-details.sh
#!/bin/bash
#
# REQUIRES
# - netstat - to retrieve network stack details
# - sysctl - to retrieve/modify kernel settings
# - bc - for math
#
# MIT License
#
# Copyright 2020 John H Patton, JH Patton Consulting, LLC
@sdmoko
sdmoko / OpenStack-instances-monitoring-with-Prometheus-Grafana.md
Created Nov 1, 2019
Step by step to Monitoring OpenStack Instances with Service Discovery Prometheus and Grafana
View OpenStack-instances-monitoring-with-Prometheus-Grafana.md

Create Instances for Prometheus Server and Grafana

Download Prometheus Server

cd /tmp
wget -c https://github.com/prometheus/prometheus/releases/download/v2.13.1/prometheus-2.13.1.linux-amd64.tar.gz

Extract Prometheus Server

@phiberoptick
phiberoptick / pritunl-server-custom-ssl_manually
Last active Jul 30, 2022
Use custom SSL cert in Pritunl Server Community
View pritunl-server-custom-ssl_manually
Ignore all that craziness below. These can be set from the cli with the "pritunl" command.
The commands below can be used to get/set the values of the cert, key, port and if the :80 -> "app.server_port" redirect is active.
# Get current SSL server cert:
pritunl get app.server_cert
# Get current SSL server key:
pritunl get app.server_key
@superseb
superseb / defaultdns.md
Last active Jul 25, 2022
Change default DNS nameserver used by Kubernetes pods
View defaultdns.md

Change default DNS nameserver used by Kubernetes pods

This can be applied generically but usually applies to Linux nodes that have a local caching nameserver running, which means pointing to an IP in the loopback range (127.0.0.0/8). Ubuntu 18.04 Bionic Beaver does this by default.

Option 1: Change host configuration

sudo systemctl mask systemd-resolved
rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
@jaskiratr
jaskiratr / chmod-400.cmd
Created Jun 29, 2018
Set permission of file equivalent to chmod 400 on Windows.
View chmod-400.cmd
# Source: https://stackoverflow.com/a/43317244
$path = ".\aws-ec2-key.pem"
# Reset to remove explict permissions
icacls.exe $path /reset
# Give current user explicit read-permission
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
# Disable inheritance and remove inherited permissions
icacls.exe $path /inheritance:r
@niedbalski
niedbalski / recover-rabbit.sh
Created Jul 5, 2017
Recover a rabbitmq cluster after partitioning
View recover-rabbit.sh
Some notes from engineering.
1) Identify the partition
Mnesia('rabbit@juju-machine-30-lxd-11'): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, 'rabbit@juju-machine-29-lxd-9'}
$ sudo rabbitmqctl cluster_status
2) Pick the most reliable node as the master.
@davydany
davydany / IPTABLES-CHEATSHEET.md
Last active Dec 2, 2022
IP Tables (iptables) Cheat Sheet
View IPTABLES-CHEATSHEET.md

IP Tables (iptables) Cheat Sheet

IPTables is the Firewall service that is available in a lot of different Linux Distributions. While modifiying it might seem daunting at first, this Cheat Sheet should be able to show you just how easy it is to use and how quickly you can be on your way mucking around with your firewall.

Resources

The following list is a great set of documentation for iptables. I used them to compile this documentation.