Skip to content

Instantly share code, notes, and snippets.

@jeffscrum
jeffscrum / easyrsa.sh
Last active June 5, 2025 15:22 — forked from QueuingKoala/setup.sh
Sub-CA example
# Assumptions: easyrsa3 available in current dir, and functional openssl.
# This basic example puts the "offline" and "sub" PKI dirs on the same system.
# A real-world setup would use different systems and transport the public components.
# Build root CA:
EASYRSA_PKI=offline easyrsa init-pki
EASYRSA_PKI=offline easyrsa build-ca nopass
# Build sub-CA request:
EASYRSA_PKI=sub easyrsa init-pki
@jeffscrum
jeffscrum / Create ECDSA certificate.txt
Created April 2, 2025 18:32 — forked from marta-krzyk-dev/Create ECDSA certificate.txt
Create self-signed ECDSA (ECC) certificate with private key inside in openssl
--- CREATE SELF-SIGNED ECDSA CERTIFICATE WITH PRIVATE KEY INSIDE ----
1. Open openssl.exe.
2. If you haven't chosen a curve, you can list them with this command:
ecparam -list_curves
I picked sect571r1 for this example. Use this to generate an EC private key if you don't have one already:
@jeffscrum
jeffscrum / debian-install-megacli.md
Created March 10, 2024 10:20 — forked from fxkraus/debian-install-megacli.md
Install LSI MegaCli .deb package on Debian/Ubuntu

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

unzip

unzip 8-07-14_MegaCLI.zip
@jeffscrum
jeffscrum / README.md
Last active January 14, 2024 15:44 — forked from ravecat/debootstrap.md
debootstrap, livecd

A live CD or live DVD is a complete bootable Linux operating system loaded from a CD or DVD. Although there are a lots of live Linux CDs, for seemingly every taste and purpose, it might still be useful on occasion to build your own. This guide details the steps to build a bootable live CD/DVD based on Debian "bullseye".

Step 1 – Installing the necessary software

These are the software packages you need to install on your Debian system:

apt-get install xorriso live-build syslinux squashfs-tools isolinux

Step 2 – Create a basic filesystem

@jeffscrum
jeffscrum / gist:9d32e72efd6744ac8eb45f59f9499167
Last active August 16, 2023 09:59
Setting everything up on one port

One port for all

With the help of this tutorial, you can do all the communication with your server (panel, TLS configurations and REALITY configurations) through one (or two) ports. The purpose of this is to make server communication more natural, to bypass restrictions on a port, or something like that.

::: tip If you have changed your panel port over time and you want the previous subscription links to still work, you can use this tutorial to make HAProxy listen on the old port and send incoming traffic to the new local port so that both subscription links work. For this, just add your previous port like port 443.

[
{
"name": "Sofle v2.1",
"author": "Konstantin Somov",
"switchMount": "cherry"
},
[
{
"y": 0.2,
"x": 3,
@jeffscrum
jeffscrum / GeoIP2 Block NGINX Debian 11.md
Last active July 11, 2024 13:30 — forked from dunderrrrrr/GeoIP Block NGINX Ubuntu 20.04.md
Allow or block GeoIP in Nginx on Ubuntu 20.04

GeoIP2 Block NGINX Debian 11

Block or filter IPs based on location in Nginx (tested on 1.18.0) on Debian 11.

Install Nginx modules

To make use of the geographical filtering, we must first install the Nginx GeoIP2 module as well as the GeoIP database containing the mappings between visitors IP addresses and their respective countries. To do so, let’s execute:

$ sudo apt install libnginx-mod-http-geoip2
@jeffscrum
jeffscrum / centos7.cfg
Last active October 18, 2022 17:16
preseed.cfg
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Use text mode install
text
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
@jeffscrum
jeffscrum / md_to_rst.sh
Created September 23, 2022 07:25 — forked from hugorodgerbrown/md_to_rst.sh
Shell script for converting a batch of *.md files into *.rst using pandoc.
# This script was created to convert a directory full
# of markdown files into rst equivalents. It uses
# pandoc to do the conversion.
#
# 1. Install pandoc from http://johnmacfarlane.net/pandoc/
# 2. Copy this script into the directory containing the .md files
# 3. Ensure that the script has execute permissions
# 4. Run the script
#
# By default this will keep the original .md file
@jeffscrum
jeffscrum / debian-preseeded-iso.sh
Last active October 12, 2022 11:58 — forked from zuzzas/debian-preseeded-iso.sh
Create Debian netinstall iso with preseed file
set -e
set -u
# hat-tips:
# - http://codeghar.wordpress.com/2011/12/14/automated-customized-debian-installation-using-preseed/
# - the gist
# required packages (apt-get install)
# xorriso