Skip to content

Instantly share code, notes, and snippets.


Joseph Bolus josephbolus

View GitHub Profile
josephbolus / Caddy.env
Created Jul 23, 2022 — forked from crazy-max/Caddy.env
Proxmox web interface through Caddy as reverse proxy with Let's Encrypt
View Caddy.env
josephbolus / caddy.service
Created Jul 22, 2022
Caddy systemd service
View caddy.service
# caddy.service
# For using Caddy with a config file.
# Make sure the ExecStart and ExecReload commands are correct
# for your installation.
# See for instructions.
# WARNING: This service does not use the --resume flag, so if you
josephbolus / Caddyfile
Created Jul 22, 2022 — forked from dimasahmad/Caddyfile
Install Caddy 2 on Ubuntu
View Caddyfile
# Refer to the Caddy docs for more information:
josephbolus / default.conf
Created Jun 16, 2022 — forked from fmaul/default.conf
nginx config that uses the oauth2-proxy (via auth_request) to authenticate against gitlab and then proxies all requests to a backend service while setting the auth headers X-User and X-Email
View default.conf
server {
listen 80;
server_name localhost;
location /oauth2/ {
proxy_pass http://oauth-proxy:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Auth-Request-Redirect $request_uri;
josephbolus / The Technical Interview Cheat
Created Mar 20, 2021 — forked from tsiege/The Technical Interview Cheat
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat


I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!


View crontab_
0 0 * * * /root/ --renew --apache --renew-hook /root/ -d
* * */5 * * "/root/"/ >> /var/log/letsencrypt.log
josephbolus /
Created Dec 15, 2020 — forked from m-radzikowski/
Minimal safe Bash script template - see the article with full description:
#!/usr/bin/env bash
set -Eeuo pipefail
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
View gist:b64448b645c9290998246debe4b2dd14
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\n",
"sources" : [ "" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "" ],
josephbolus / add_ssl_to_cloudkey.txt
Last active Aug 13, 2019 — forked from potto007/add_ssl_to_cloudkey.txt
Set up Free SSL with Ubiquiti UniFi Cloud Key -- follow instructions in `add_ssl_to_cloudkey.txt`
View add_ssl_to_cloudkey.txt
1) Login to Cloud Key
2) Cloud Key ssh: `curl | sh`
3) Cloud Key ssh: ` --upgrade --auto-upgrade --accountemail ""`
4) Cloud Key ssh: Add `` file to `/root/`
5) Create free CloudFlare account (if not already member)
6) Login to CloudFlare
7) On CloudFlare: Create a zone for a domain you own (can add a cheap domain with or any number of alternatives)
8) On CloudFlare: Create an A record for your Cloud Key; ie: unifi.CHANGE.ME,
9) On UniFi Controller: Go to Settings; Click "Controller"; Change "Controller Hostname/IP" to the name entered in step 8.
10) On CloudFlare: go to Overview for your zone; click "Get your API key"
# Renew-hook for ACME / Let's encrypt
echo "** Configuring new Let's Encrypt certs"
cd /etc/ssl/private
rm -f /etc/ssl/private/cert.tar /etc/ssl/private/unifi.keystore.jks /etc/ssl/private/ssl-cert-snakeoil.key /etc/ssl/private/fullchain.pem
openssl pkcs12 -export -in /etc/ssl/private/cloudkey.crt -inkey /etc/ssl/private/cloudkey.key -out /etc/ssl/private/cloudkey.p12 -name unifi -password pass:aircontrolenterprise
keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore /usr/lib/unifi/data/keystore -srckeystore /etc/ssl/private/cloudkey.p12 -srcstoretype PKCS12 -srcstorepass aircontrolenterprise -alias unifi