Skip to content

Instantly share code, notes, and snippets.

View lazerl0rd's full-sized avatar
🌐
Handing DNS so you don't have to.

Diab Neiroukh lazerl0rd

🌐
Handing DNS so you don't have to.
View GitHub Profile
load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so;
load_module /usr/lib/nginx/modules/ngx_http_brotli_static_module.so;
load_module /usr/lib/nginx/modules/ngx_http_zstd_filter_module.so;
load_module /usr/lib/nginx/modules/ngx_http_zstd_static_module.so;
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
@lazerl0rd
lazerl0rd / Dockerfile
Created October 18, 2023 03:00
NGINX Docker built top of rolling release QuicTLS, Zlib-ng, the ZSTD module, Mimalloc, and the OQS Provider.
FROM alpine:latest
ENV LD_PRELOAD=/usr/lib/libmimalloc-secure.so
ENV MIMALLOC_LARGE_OS_PAGES=1
ENV NGINX_VERSION=1.25.2
RUN GPG_KEYS=13C82A63B603576156E30A4EA0EA981B66B0D967 \
&& CONFIG="\
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
#! /usr/bin/env bash
args="$@"
argsUnsupported="false"
asUser="root"
if [[ $@ == "" ]]; then
echo "usage: xsudo [command [arg ...]]"
echo "usage: xsudo [-u user] [command [arg ...]]"
exit 1
#! /usr/bin/env bash
declare -A extraPaths=( \
["certbot"]="/etc/letsencrypt /root/.secrets/certbot/cloudflare.ini" \
)
takeOwnership() {
local datafsMount="$(stat -c '%n' "/srv/$1" 2> /dev/null)"
local mount="$(podman mount "$1")"
local volumeMount="$(podman volume mount $1 2> /dev/null)"
#! /usr/bin/env bash
case "$1" in
"get")
if [[ -f /tmp/mkinitcpio-defer ]]; then
rm /tmp/mkinitcpio-defer
exit 0
else
exit 1
fi
#! /usr/bin/env bash
if [ $# -eq 0 ]; then
/usr/bin/mcrcon -H 172.16.0.18 -P "$(cat "/srv/minecraft/server.properties" | grep "rcon.port" | awk -F "=" '{print $2}')" -p "$(cat "/srv/minecraft/server.properties" | grep "rcon.password" | awk -F "=" '{print $2}')"
else
/usr/bin/mcrcon "$@"
fi
#! /usr/bin/env bash
features=("rx" "tx" "sg" "tso" "ufo" "gso" "gro" "lro" "rxvlan" "txvlan" "ntuple" "rxhash" "rx-udp-gro-forwarding")
for i in "${features[@]}"; do
ethtool -K "$1" "$i" on
done
#! /usr/bin/env bash
# shellcheck disable=SC2086
readarray -t bashismUsers < <(IFS=:; grep -Irl -e '#!/bin/sh' -e '#! /bin/sh' -e '#!/usr/bin/env sh' -e '#! /usr/bin/env sh' $PATH | xargs -r checkbashisms 2>&1 | grep "possible bashism" 2>&1 | sed 's/^possible bashism in //g' | sed 's/ line.*$//g')
for i in "${bashismUsers[@]}"; do
echo "Modifying \"$i\" in-place to use Bash directly..."
sed -i 's/#!\/bin\/sh/#!\/bin\/bash/g' $i
sed -i 's/#! \/bin\/sh/#! \/bin\/bash/g' $i
sed -i 's/#!\/usr\/bin\/env sh/#!\/usr\/bin\/env bash/g' $i
#! /usr/bin/env bash
domainArg=""
for domain in "${@}"; do
[[ $domainArg != "" ]] && domainArg+=" "
domainArg+="-d $domain"
done
if [[ $domainArg != "" ]]; then
#! /usr/bin/env bash
# shellcheck disable=SC2086
readarray -t bashismUsers < <(IFS=:; grep -Irl -e '#!/bin/sh' -e '#! /bin/sh' -e '#!/usr/bin/env sh' -e '#! /usr/bin/env sh' $PATH | xargs -r checkbashisms 2>&1 | grep "possible bashism" 2>&1 | sed 's/^possible bashism in //g' | sed 's/ line.*$//g')
for i in "${bashismUsers[@]}"; do
echo "Modifying \"$i\" in-place to use Bash directly..."
sed -i 's/#!\/bin\/sh/#!\/bin\/bash/g' $i
sed -i 's/#! \/bin\/sh/#! \/bin\/bash/g' $i
sed -i 's/#!\/usr\/bin\/env sh/#!\/usr\/bin\/env bash/g' $i