Skip to content

Instantly share code, notes, and snippets.

@dogukancagatay
dogukancagatay / install-java-f42.sh
Created October 7, 2025 10:56
Proper way to install Java on Fedora 42
sudo dnf install -y adoptium-temurin-java-repository
sudo dnf config-manager setopt adoptium-temurin-java-repository.enabled=1
sudo dnf install -y temurin-17-jre
@dogukancagatay
dogukancagatay / proxmox-disable-clustering.sh
Created September 20, 2025 18:43
Proxmox VE disable clustering
# Proxmox VE disable clustering -- Run on all nodes
rm -rf /etc/corosync/*
rm /etc/pve/corosync.conf
killall pmxcfs
systemctl start pve-cluster
# Optional: remove the other nodes
rm -rf /etc/pve/nodes/pve
@dogukancagatay
dogukancagatay / utils.sh
Created September 8, 2025 08:26
my terminal utility toolbox
# generate secure passwords using pwgen without the complications of quote characters ('"`)
alias pwg="pwgen -1 --symbols --secure --remove-chars \\\`\\'\\\""
@dogukancagatay
dogukancagatay / install_docker_fedora.sh
Created April 2, 2025 07:43
Quick copy-paste to install docker engine on Fedora
sudo dnf install -y dnf-plugins-core
sudo dnf-3 config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo docker run hello-world
sudo usermod -aG docker $USER
@dogukancagatay
dogukancagatay / check_clock_drift.py
Created March 7, 2025 21:14
Python script that calculates the time difference between the local computer clock and an NTP server.
import time
import ntplib
def get_ntp_time_difference(ntp_server: str = "pool.ntp.org") -> float:
"""Calculates the time difference between the local computer clock and an NTP server."""
try:
response = ntplib.NTPClient().request(ntp_server, version=3)
return response.tx_time - time.time()
@dogukancagatay
dogukancagatay / list-remove-repo-gpg-keys.md
Created January 6, 2025 09:43
List and remove repository GPG keys on Fedora

List and Remove Repository GPG Keys

This is especially useful when server GPG keys are updated.

List the repository GPG keys that are currently installed with

sudo rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'
@dogukancagatay
dogukancagatay / TraefikSetup.ps1
Last active December 4, 2024 13:48
Traefik service installer for Windows
# Before running you need to modify the Execution policy from Administrator Powershell console
# Set-ExecutionPolicy -Force -ExecutionPolicy RemoteSigned
# .\TraefikSetup.ps1
$TraefikHome = "C:\Traefik"
$TraefikRelease = "v2.1.4"
$NssmHome = "C:\nssm"
$NssmRelease = "2.24"
@dogukancagatay
dogukancagatay / karabiner-ms-ergonomic.json
Created November 25, 2024 15:12
Karabiner key mapping configuration for Microsoft Ergonomic Keyboard on MacOS
{
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "Map Microsoft Ergonomic keyboard lock button",
"manipulators": [
{
"from": {
@dogukancagatay
dogukancagatay / export_import_gpg_keys.md
Created July 30, 2024 08:06
Export and import GPG keys

List your secret keys, and decide which one to export.

gpg --list-secret-keys --keyid-format LONG

Export the secret and public parts of the key.

gpg --export --armor  > gpg-pub.asc
@dogukancagatay
dogukancagatay / prepare-commit-msg.sh
Last active July 16, 2024 10:59
Git hook that prepends Jira issue ID from the branch name to the commit message
#!/usr/bin/env bash
#
# Git hook that appends Jira issue ID from the branch name to the commit message.
#
# e.g. for the branch name `feature/ABC-1234/add-xyz`, the `[ABC-1234]`
# is added to the commit message as well as summary.
#
# Installation:
# $ curl -fsSL -o .git/hooks/prepare-commit-msg \
# 'https://gist.githubusercontent.com/dogukancagatay/38792bf7ace99817555389e043ed954a/raw/prepare-commit-msg.sh'