Skip to content

Instantly share code, notes, and snippets.

@ginmaster
ginmaster / viznodelist.lua
Created October 30, 2021 21:02 — forked from pgundlach/viznodelist.lua
LuaTeX nodelist visualization
--
-- viznodelist.lua
-- speedata publisher
--
-- Written 2010-2020 by Patrick Gundlach.
-- This file is released in the spirit of the well known MIT license
-- (see https://opensource.org/licenses/MIT for more information)
--
-- visualizes nodelists using graphviz
@ginmaster
ginmaster / emlToMbox.py
Created January 2, 2022 22:59 — forked from kadin2048/emlToMbox.py
Combine a directory of .eml files into a single Unix "mbox" file.
#!/usr/bin/env python3
""" Converts a directory full of .eml files to a single Unix "mbox" file.
This is similar to http://www.cosmicsoft.net/emlxconvert.html
Accepts as input either an individual .eml file or a directory containing one
or more .eml files.
Usage:
$ ./emlToMbox.py inputdir/ output.mbox
@ginmaster
ginmaster / gpg_fix.txt
Created January 7, 2022 00:58 — forked from cezaraugusto/gpg_fix.txt
fixing `gpg failed to sign data` error on macOS
For troubleshooting, two things to first try:
run `git config --global gpg.program gpg2`, to make sure git uses gpg2 and not gpg
run `echo "test" | gpg2 --clearsign`, to make sure gpg2 itself is working
If that all looks all right, one next thing to try:
run `brew install pinentry` to ensure you have a good tool installed for passphrase entry
If after that install and you re-try git commit and still get the "failed to sign the data" error:
run `gpgconf --kill gpg-agent` to kill any running agent that might be hung
@ginmaster
ginmaster / nextcloud-pgsql-redis-traefikv2-docker-compose.yml
Created February 28, 2022 16:42 — forked from ismailyenigul/nextcloud-pgsql-redis-traefikv2-docker-compose.yml
Docker-compose file for nextcloud with pgsql,redis and traefik deployment
# docker network create nextcloud
NOTES:
1. certificatesresolvers.myresolver.acme.email=myemail@gmail.com
2. TRUSTED_PROXIES values based on your 'nexcloud network'
3. remove traefik.http.middlewares.nextcloud.headers.contentSecurityPolicy and
traefik.http.middlewares.nextcloud.headers.customFrameOptionsValue if you don't want to allow iframe your domain
3
# cat docker-compose.yml
@ginmaster
ginmaster / githubpull.md
Created March 1, 2022 11:47 — forked from Jabarabo/githubpull.md
Gist of a stolen gist

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.

@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
@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 / 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

# ---------------------------------------------------------------------------
#
# 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