Skip to content

Instantly share code, notes, and snippets.

View spmzt's full-sized avatar
🔑
Focusing

Pouria Mousavizadeh Tehrani spmzt

🔑
Focusing
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:

@daemonhorn
daemonhorn / freebsd_yubikey_authentication.md
Last active June 1, 2025 12:08
Setting up yubikey/solo2 for piv, fido, and gpg on FreeBSD (Firefox, Chromium, PAM, SSH, and GnuPG)

Overview

How to configure FreeBSD and applicable applications to work with Yubikey for authentication. This serves as my work-in-progress documentation of the configuration knobs needed to make this work properly.

  • FreeBSD ssh with piv smartcard slot on Yubikey (pkcs11 via libykcs11.so)
  • FreeBSD ssh with fido support on Yubikey
  • FreeBSD Firefox/Chromium with fido + webauthn support on Yubikey
  • FreeBSD local console and gdm authentication using pam on Yubikey
  • FreeBSD official YubiKey tools

Latest Tested FreeBSD versions

  • FreeBSD 13.2 Testing (Aug 2023)
  • FreeBSD stable/13 Testing (Aug 2023) with OpenSSH_9.3p2
@jamesog
jamesog / README.md
Last active April 20, 2025 16:06
YubiKey as an SSH CA
@pcjunk
pcjunk / ipfw.rules
Last active March 1, 2025 15:29
Minimal NAT64 /etc/ipfw.rules
IPV4_HOST="__IPV4_HOST__"
IPV6_HOST="__IPV6_HOST__"
IPV4_NAT="__IPV4_NAT__/32"
NAT64_HOST="__NAT64_HOST__"
NAT64_NETWORK="__NAT64_NETWORK__"
LOG=${LOG:+log}
# Flush
@mxmeinhold
mxmeinhold / blog-wkd.md
Last active February 29, 2024 01:44
Hosting GPG keys with Nginx and WKD

Hosting my GPG key

I host my gpg key on my personal nginx server, and make it accessible via https (gpg.mxmeinhold.com) and WKD. This means my key is obtainable by curl or by auto-key-locate, e.g.:

$ curl -L gpg.mxmeinhold.com | gpg --import-options show-only --import
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0   2918      0 --:--:-- --:--:-- --:--:--  2966
100 11406  100 11406    0     0  64440      0 --:--:-- --:--:-- --:--:-- 64440
pub   rsa4096 2018-03-05 [SC] [expires: 2023-01-23]
@mattiasghodsian
mattiasghodsian / readme.md
Last active May 28, 2025 15:21
How to create a Windows application Installer with NSIS

Nullsoft Scriptable Install System is also known as NSIS open-source system to create Windows application installers. NSIS is a script-based system allowing you to create the logic behind your installer/setup file in a complex way to install tasks. NSIS offers plug-ins and other scripts, for example, to download/install 3rd-party files or communicate with Windows.

The tutorial application

This tutorial will guide you through installing and creating your first Windows installer with Nullsoft Scriptable Install System and how to compile your project. Captura Portable will be used as "our application" for the sake of this tutorial.

Installation

Head to NSIS official site and download the latest release and install it. Run NSIS and you will be welcomed with a menu like below, It's always a good practice to read the Documentation before jumping in t

@dlangille
dlangille / 1 - I plan to turn these off
Last active June 6, 2025 22:21
Periodic things to turn off in FreeBSD jails
# after reviewing /etc/defaults/periodic.conf I have decided
# to disable these items in jails
daily_status_disks_enable="NO"
daily_status_network_enable="NO"
daily_status_uptime_enable="NO"
# not needed on jails
daily_ntpd_leapfile_enable="NO"
@DerekParry
DerekParry / soundcloud_scrape_likes.js
Last active April 21, 2025 21:29
Scrape SoundCloud Likes in spreadsheet format
/*
Derek Parry, March 2018
JS script I use to scrape my SoundCloud Likes in a format that works well with spreadsheets
Instructions:
1. Log into your SoundCloud account at https://soundcloud.com
2. Navigate to your Likes at https://soundcloud.com/you/likes
3. Open your browser's console for this page
4. Paste the code below
5. Hit 'Enter' and wait for the results
@soulsearcher
soulsearcher / logstash-openvpn.conf
Last active November 7, 2022 01:56
logstash for openvpn log
input {
# dummy data from files
#file {
# path => "D:/dev/elastic5/sample-logs/vpn/messages-*"
# start_position => "beginning"
#}
beats {
port => 5044
}