Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View craffate's full-sized avatar

Cyril Raffatelli craffate

View GitHub Profile
@craffate
craffate / status.sh
Created August 26, 2022 02:33
FastCGI server status script
#!/bin/sh
echo 'Content-Type: text/plain'
echo ''
echo -n "Kernel:\t\t\t"; uname -sr
echo -n "Uptime:\t\t\t"; uptime -p
echo "Gateway interface:\t$GATEWAY_INTERFACE\nServer software:\t$SERVER_SOFTWARE\nServer protocol:\t$SERVER_PROTOCOL\nServer address:\t\t$SERVER_ADDR\nServer port:\t\t$SERVER_PORT\nServer name:\t\t$SERVER_NAME"
@craffate
craffate / generate_certificate.sh
Created October 23, 2021 14:36
Generates a self-signed certificate for localhost
#!/bin/sh
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=GB/ST=Wonderland/L=Wonderland/O=Alice/CN=localhost" -keyout localhost.key -out localhost.crt