Skip to content

Instantly share code, notes, and snippets.

View f9n's full-sized avatar
💭
I may be slow to respond.

Fatih Sarhan f9n

💭
I may be slow to respond.
View GitHub Profile
@f9n
f9n / unbound-cheat-sheet.md
Last active October 25, 2026 18:26
Unbound Cheat Sheet

Unbound Cheat Sheet

Installation

$ yum install -y unbound

Setup SSL keys for unbound-control

@f9n
f9n / Vagrantfile
Created March 31, 2026 07:02
Vagrantfile for k8s cluster
VM_BOX = "ubuntu/noble64"
K8S_MASTER_CPUS = 2
K8S_MASTER_MEMORY = 4096
K8S_WORKER_NODES = 2
K8S_WORKER_CPUS = 2
K8S_WORKER_MEMORY = 2048
IP_PREFIX = "10.61.0"
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
@f9n
f9n / tsh-x.sh
Created January 27, 2026 21:14
Change teleport proxy
function tsh-x() {
# 1. List local profiles by looking at the keys directory and select via fzf
local selected_profile=$(ls -d ~/.tsh/keys/*/ 2>/dev/null | xargs -n 1 basename | fzf --height 15% --reverse --header="📡 Select Teleport Cluster")
# Exit if no selection is made (e.g., if ESC is pressed)
if [ -z "$selected_profile" ]; then
echo "No cluster selected."
return
fi
@f9n
f9n / windows10qemu.md
Last active December 12, 2025 20:11
Running Windows 10 in a UEFI enabled QEMU environment with KVM.
@f9n
f9n / remove_unnecessary_messages.md
Created December 21, 2024 20:27
Remove unnecessary message on git commits (:xd)

Remove unnecessary messages on git commits

$ git clone <repo>
$ cd <repo>
$ brew install git-filter-repo
$ git filter-repo --replace-text <(echo 'kezzap==>arkadasim')
@f9n
f9n / uninstall-trend-micro.sh
Created April 13, 2020 19:11
Uninstall Trend Micro Security script
#!/bin/sh
# Credits:
# https://www.jamf.com/jamf-nation/discussions/28033/uninstall-trend-micro-security-script
# Copyright: EVRY
# Filename: UninstallTrend.sh
# Requires: -
# Purpose: Removes Trend Micro Security
# Contact: Anders Holmdahl <anders.holmdahl@evry.com>
# Mod history: 2018-01-31
@f9n
f9n / redis_delete_keys_without_ttl.sh
Last active February 3, 2023 09:05 — forked from patrickhulce/findkeys.sh
Delete all keys without a TTL in Redis
#!/bin/sh
LIMIT=$1
redis-cli keys "*" | head -n $LIMIT > keys.txt
cat keys.txt | xargs -n 1 -L 1 redis-cli ttl > ttl.txt
paste -d " " keys.txt ttl.txt | grep .*-1$ | cut -d " " -f 1 | xargs redis-cli del
@f9n
f9n / aws_cloudwatch_generic_alarms.py
Last active August 15, 2022 08:38
Generic alarms for Aws Cloudwatch
# In 2019
import os
import json
import sys
import time
import copy
# Import requirement python packages
file_path = os.path.dirname(__file__)
module_path = os.path.join(file_path, "env")
@f9n
f9n / undefined_ec2_instance_name.py
Last active August 15, 2022 08:37
Undefined ec2 instance name alert
# In 2019
import os
import json
import time
import boto3
TOPIC_NAME = os.getenv("TOPIC_NAME", "FatihMail")
SLEEP_TIME = os.getenv("SLEEP_TIME", 300)
@f9n
f9n / pytesseract-rest-api.py
Created June 8, 2022 12:16
Pytesseract Rest Api
import json
from flask import Flask, request
from werkzeug.utils import secure_filename
import pytesseract
app = Flask(__name__)