Skip to content

Instantly share code, notes, and snippets.

View ozgurkazancci's full-sized avatar
🎯
📌Nosce te ipsum

Özgür Konstantin Kazanççı ozgurkazancci

🎯
📌Nosce te ipsum
View GitHub Profile
@ctsrc
ctsrc / 00_install_fbsd_14_1_hetzner.md
Last active May 2, 2025 08:03
Install FreeBSD 14.1 on Hetzner

Install FreeBSD 14.1 on Hetzner server

Hetzner no longer offers direct install of FreeBSD, but we can do it ourselves. Here is how :)

Boot the server into rescue mode

Boot the Hetzner server in Hetzner Debian based rescue mode. ssh into it.

The Hetzner rescue image will tell you hardware details about the server in the login banner. For example, with one of my servers I see:

@rraallvv
rraallvv / enable-ssl-wordpress-with-nginx.md
Last active January 30, 2020 21:29
Enable SSL for WordPress with Nginx

In order to use Wordpress in SSL with NGINX add

$_SERVER['HTTPS']='on';

to wp-config.php just before

require_once(ABSPATH . 'wp-settings.php');
@rraallvv
rraallvv / open-cloudflare-ufw.sh
Last active May 20, 2020 13:45
Open ports to Cloudflare with UFW
#!/usr/bin/env bash
# Instructions:
#
# 1) Place this script in the /root/ directory, give it proper permissions.
# $ sudo chmod +x /root/open-cloudflare.sh
#
# 2) Open the cron job editor
# $ sudo crontab -e
#
@rraallvv
rraallvv / benchmarking.sh
Last active January 30, 2020 21:29
Benchmarking
# CPU
sysbench --test=cpu --cpu-max-prime=1000 run
# Disk
# Random read write
fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=1M --readwrite=randrw --rwmixread=75
# Random read
fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=1M --readwrite=randread
# Random write
fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=1M --readwrite=randwrite
@cokebar
cokebar / install_nginx_with_libressl.sh
Last active September 12, 2024 13:03
A example script to build and install nginx with libressl instead of openssl
#!/bin/bash
set -e -o pipefail
latest_nginx=$(curl -L http://nginx.org/en/download.html | egrep -o "nginx\-[0-9.]+\.tar[.a-z]*" | head -n 1)
latest_libressl=$(curl -L http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/ | egrep -o "libressl\-[0-9.]+\.tar\.gz" | tail -n 1)
(curl -fLRO "http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${latest_libressl}" && tar -xaf "${latest_libressl}") &
(curl -fLRO "http://nginx.org/download/${latest_nginx}" && tar -xaf "${latest_nginx}") &
wait
@pirafrank
pirafrank / uninstall_office_2016.sh
Last active April 23, 2025 18:45
Uninstall Office 2016 from OS X completely
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo -e "
ROOT PRIVILEDGES NEEDED!
You have to run this script as root.
Aborting...
"
exit 1
else
@plentz
plentz / nginx.conf
Last active May 27, 2025 10:32
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048