Skip to content

Instantly share code, notes, and snippets.

@claudio4
claudio4 / build_nginx.sh
Last active April 18, 2021 22:04
Download & Build Nginx with OpenSSL and PCRE with version selector
#!/usr/bin/env bash
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ]; then
>&2 echo "No enough arguments provided. use ./build_nginx.sh nginx-version PCRE-version openssl-version [install]"
exit 1
fi
if [ "$4" == "yes" ]; then
INSTALL='yes'
else
INSTALL='no'
fi
@Miguel-Dorta
Miguel-Dorta / MinecraftSystemdWrapper.go
Last active April 18, 2020 23:12
Systemd wrapper for Minecraft servers.
// MIT License <https://opensource.org/licenses/MIT> - Copyright (c) 2020 Miguel Dorta
package main
import (
"fmt"
"golang.org/x/sys/unix"
"io"
"os"
"os/exec"
"os/signal"
@claudio4
claudio4 / sc-pxl-hook.sh
Created January 21, 2017 18:34
PXL.LT Hook for ScreenCloud
PXLKEY='YOUR pxl.lt key'
curl -s \
-F "file=@$1" \
-F "upload-key=$PXLKEY" \
https://pxl.lt/screenshot/upload.php; echo
@claudio4
claudio4 / build_nginx.sh
Last active December 6, 2019 19:15 — forked from Belphemur/build_nginx.sh
Compiling Nginx with LibreSSL (and http2)
#!/usr/bin/env bash
if [ "$1" == "" ] || [ "$2" == "" ] || [ "$3" == "" ]; then
>&2 echo "No enough arguments provided. use ./build_nginx.sh nginx-version PCRE-version libressl-version"
exit 1
fi
# names of latest versions of each package
export NGINX_VERSION=$1
export VERSION_PCRE="pcre-$2"
export VERSION_LIBRESSL="libressl-$3"
export VERSION_NGINX=nginx-$NGINX_VERSION