Skip to content

Instantly share code, notes, and snippets.

View borun's full-sized avatar

Md Abdullah Al Farooq borun

View GitHub Profile
@borun
borun / domainize.sh
Created August 10, 2023 16:36
A simple bash script to publish a local web development directory into a local test domain. This script is written for MacOS with Homebrew and Nginx. You can modify it for other environment.
#!/bin/bash
pwd=`pwd`
name=`basename "$pwd"`
echo "You are about to make a local dev path '${pwd}' into a domain '${name}.test'"
read -n1 -p "Proceed? (y/n):" check
echo
if [[ $check != "y" ]]; then
echo "Exiting..."
@borun
borun / openvpn_gen.py
Last active April 14, 2025 13:29 — forked from Justasic/openvpn_gen.py
This is a python script to generate client OpenVPN configuration files. This is based mostly on the easyrsa script and is much simpler to understand.
# Many features of pyOpenSSL package are depricated. So we are using the cryptography library instead.
# pip install cryptography
from cryptography import x509
from cryptography.x509.oid import NameOID
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography.hazmat.primitives.serialization import Encoding, PrivateFormat, NoEncryption
from cryptography.hazmat.primitives import serialization # Fix: Import serialization
from datetime import datetime, timedelta, UTC # Fix: Import datetime and timedelta