Skip to content

Instantly share code, notes, and snippets.

@ginmaster
ginmaster / setup.sh
Created May 30, 2022 06:14
Ubuntu 20.04 + Nginx (reverse proxy) + Apache2 + PHP 7.4 + SSL + cloudflare
#!/bin/bash
set -e # Terminate if script has error
####################################################################
# Variables used
####################################################################
sitedir=""
fqn=""
@ginmaster
ginmaster / letsencrypt_2020.md
Created May 25, 2022 22:21 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

Keybase proof

I hereby claim:

  • I am ginmaster on github.
  • I am crainma (https://keybase.io/crainma) on keybase.
  • I have a public key ASD0pXB_favB-jaURX6nL4HC8UtPWn9yyl3SnMbKGA0QVQo

To claim this, I am signing this object:

@ginmaster
ginmaster / Cliref.md
Created May 18, 2022 15:17 — forked from yunga/Cliref.md
CLIRef.md
_________ _____ _______________       _____
\_   ___ \\    \\___________   \____ / ____\     ~/.bash/cliref.md
/    \  \/|    | |   ||       _/ __ \  __\    copy/paste from whatisdb
\     \___|__  |_|_  ||    |   \  __/|_ |   http://pastebin.com/yGmGiDQX
 \________  /_____ \_||____|_  /____  /_|     yunga.palatino@gmail.com
 20160515 \/ 1527 \/         \/     \/

alias CLIRef.txt='curl -s "http://pastebin.com/raw/yGmGiDQX" | less -i'

@ginmaster
ginmaster / python-3.6.10-m1.patch
Created April 23, 2022 08:12
python-3.6.10-m1.patch
diff --git configure configure
index e39c16eee2..2455870bf8 100755
--- configure
+++ configure
@@ -5202,10 +5202,6 @@ $as_echo "$as_me:
" >&6;}
fi
-
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@ginmaster
ginmaster / restic.md
Created March 19, 2022 20:03 — forked from rolfn/restic.md
Backup auf Cloud-Speicher mit »restic«

Automatische Backups auf Online-Speicher mit »Restic«

Das Programm »Restic« ist ein modernes Backup-Programm, welches als Speicherort sowohl lokale Verzeichnisse als auch per Netzwerk erreichbare Speicher (Online-Speicher) nutzen kann. Der Autor von »Restic« zeigt in anschaulicher Weise in zwei Videos viele Details zur Arbeitsweise seines Programms: »FOSDEM 2015« (2015-01-28) und »CCCCologne« (2016-01-29).

Im Folgenden soll gezeigt werden, wie man unter Linux automatische Backups mit »Restic« einrichten kann. Als Speicherort wird per WebDAV-Protokoll erreichbarer Online-Speicher genutzt. Sinngemäß können die Hinweise aber auch auf andere Speicherorte übertragen werden. Getestet wurde unter »openSUSE« und »Linux Mint« (»Ubuntu«), wobei aber auch alle anderen systemd-basierten Linux-Distributionen in derselben Art oder mit geringfügigen Änderungen geeignet sind.

Installation

@ginmaster
ginmaster / ubuntu-20.04-lts-perfect-setup.sh
Created March 19, 2022 20:03 — forked from eRQee/ubuntu-20.04-lts-perfect-setup.sh
Ubuntu 20.04 LTS Apps Server Installation Wizard
clear
##############
# Am I root? #
##############
if [ "x$(id -u)" != 'x0' ]; then
echo 'Error: this script can only be executed by root.'
echo 'Try re-run the script after switched to root account by type "sudo su"'
exit 1
fi
@ginmaster
ginmaster / init.sh
Last active May 10, 2024 14:23
Setup vaultwarden + fail2ban + caddy2 + Yubikey on Ubuntu (Amd64) on digitalocean with docker-compose
#!/bin/bash
printf "
####################################################################
# Tested with following setup: #
# Ubuntu 20.04 (LTS) x64 droplet on digitalocean with a cloudflare #
# managed domain pointing to the droplet's external IP. Please #
# follow the steps commented in init.sh: #
####################################################################\n"
# ssh root@1.2.3.4 (IP of droplet)
# wget https://gist.github.com/ginmaster/c6d11697c4fa67442889f379380ba6c0/raw/d58f803e731eadf3d2bb0951ff1c0e6d7d18ef69/init.sh

Master

"Knowledge is powerful, be careful how you use it!"

A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more.