Skip to content

Instantly share code, notes, and snippets.

View cmersinli's full-sized avatar
🏠
Working from home

Çağlar MERSİNLİ cmersinli

🏠
Working from home
View GitHub Profile
@cmersinli
cmersinli / teams-chat-post-for-workflows.sh
Created September 21, 2024 20:21 — forked from chusiang/teams-chat-post-for-workflows.sh
Post a message to Microsoft Teams with bash script.
#!/bin/bash
# =============================================================================
# Author: Chu-Siang Lai / chusiang (at) drx.tw
# Filename: teams-chat-post-for-workflows.sh
# Modified: 2024-07-22 11:44 (UTC+08:00)
# Description: Post a message to Microsoft Teams via "Post to a chat when a webhook request is received" workflows.
# Reference:
#
# - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025
# - https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/
@cmersinli
cmersinli / generate-wildcard-certificate.sh
Created September 14, 2024 22:17 — forked from dmadisetti/generate-wildcard-certificate.sh
Generate self-signed wildcard SSL certificate for development environment
#!/usr/bin/env bash
# print usage
DOMAIN=$1
if [ -z "$1" ]; then
echo "USAGE: $0 tld"
echo ""
echo "This will generate a non-secure self-signed wildcard certificate for "
echo "a given development tld."
echo "This should only be used in a development environment."
@cmersinli
cmersinli / 5_steps_for_creating_templates_and_vms_on_proxmox_using_linux_distros_cloud_images.md Creating Templates and Virtual Machines on Proxmox using cloud images from various Linux distributions.

5 Steps for Creating Templates and Virtual Machines on Proxmox using Linux Distro's Cloud Images

This tutorial guides you through the process of creating Templates and Virtual Machines on Proxmox using cloud-based images from various Linux distributions. We provide clear instructions for Alma Linux 9, Amazon Linux 2, CentOS 9, Fedora 38, Oracle Linux 9, RHEL 9, Rocky Linux 9, and Ubuntu 23.04 Lynx Lobster.

Note: The instructions have been tested on Proxmox 8.0.4.

Let's begin by choosing the cloud-based image. If you already have your preferred Linux distribution, skip to the 1st step.

To assist in making informed choices when selecting a Linux distribution for your virtual machines, we've compiled a table showcasing key characteristics of each cloud image. This table provides a snapshot of important attributes, including kernel version, Python version, number of processes initialized after boot, number of packages installed, free memory after boot, VM disk size, root partition disk size, used size on t

@cmersinli
cmersinli / kernel_tuning.md
Created March 30, 2024 14:20 — forked from brooksphilip/kernel_tuning.md
RKE2 Kernel Tuning
echo " updating kernel settings"
cat << EOF >> /etc/sysctl.conf
# SWAP settings
vm.swappiness=0
vm.panic_on_oom=0
vm.overcommit_memory=1
kernel.panic=10
kernel.panic_on_oops=1
vm.max_map_count = 262144
@cmersinli
cmersinli / rke2-install-tips
Created January 27, 2024 16:45 — forked from zackbradys/rke2-install-tips
Effortless, Easy, and Efficient installation steps of Rancher Kubernetes Engine 2 (RKE2)
--- RKE2 SERVER NODES (CONTROL PLANE) ---
### Apply System Settings
cat << EOF >> /etc/sysctl.conf
### Modified System Settings
vm.swappiness=0
vm.panic_on_oom=0
vm.overcommit_memory=1
kernel.panic=10
kernel.panic_on_oops=1
vm.max_map_count = 262144
@cmersinli
cmersinli / longhorn-install-tips
Created January 27, 2024 16:44 — forked from zackbradys/longhorn-install-tips
Effortless, Easy, and Efficient installation steps of Rancher Longhorn
### Add and Update the Helm Repository
helm repo add longhorn https://charts.longhorn.io
helm repo update
### Create the Longhorn Namespace and Install Longhorn
kubectl create namespace longhorn-system
helm upgrade -i longhorn longhorn/longhorn --namespace longhorn-system --set ingress.enabled=true --set ingress.host=longhorn.example.com
### Wait for the deployment/rollout
sleep 30
@cmersinli
cmersinli / rke2-kubevip.md
Created January 27, 2024 16:43 — forked from zackbradys/rke2-kubevip.md
rke2 cluster with kubevip load balancing
@cmersinli
cmersinli / rke2_kubevip.md
Created January 27, 2024 16:33 — forked from bgulla/rke2_kubevip.md
RKE2 api-server HA with Kube-VIP

On-Prem RKE2 api-server HA with Kube-VIP

               ,        ,  _______________________________
   ,-----------|'------'|  |                             |
  /.           '-'    |-'  |_____________________________|
 |/|             |    |    
   |   .________.'----'    _______________________________
   |  ||        |  ||      |                             |
   \__|'        \__|'      |_____________________________|
@cmersinli
cmersinli / rke2-commands.md
Created January 22, 2024 19:24 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@cmersinli
cmersinli / pg_dump script.sh
Created November 14, 2023 19:12 — forked from vielhuber/script.sh
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux