Skip to content

Instantly share code, notes, and snippets.

@dogukancagatay
dogukancagatay / british-measurement-unit-guide.md
Last active January 29, 2026 07:28
This flowchart is a humorous breakdown of the United Kingdom’s notoriously inconsistent "hybrid" measurement system.

How to Measure Things Like A Brit

This flowchart is a humorous breakdown of the United Kingdom’s notoriously inconsistent "hybrid" measurement system.

While the UK officially began "metrication" in the 1960s, the chart illustrates how the British public continues to jump between Metric and Imperial units depending on the context:

  • The Daily Commute: Distance and speed remain strictly Imperial (Miles and MPH).
  • The Pub & Kitchen: You buy beer and milk in Pints, but wine and soda in Litres.
  • The Human Body: Most Brits still measure their height in Feet/Inches and their weight in Stone/Pounds, though medical contexts often use kilograms.
  • The DIY Paradox: A British handyman might measure a piece of wood in Millimetres, only to refer to it colloquially by its Imperial size (like a "2 by 4").
@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