Skip to content

Instantly share code, notes, and snippets.

View DavidPesticcio's full-sized avatar
🚀
¯\_(ツ)_/¯

David Pesticcio DavidPesticcio

🚀
¯\_(ツ)_/¯
View GitHub Profile
@DavidPesticcio
DavidPesticcio / README.md
Created August 28, 2021 12:05 — forked from paolocarrasco/README.md
How to understand the `gpg failed to sign the data` problem

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@DavidPesticcio
DavidPesticcio / README.md
Created August 7, 2021 15:44 — forked from yorickdowne/README.md
Ubuntu Desktop 20.04 with mirrored ZFS boot drive

Overview

Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS

This adds a mirror to an existing Ubuntu ZFS boot drive after the fact.

ZFS requires native encryption to be added at pool / dataset creation. Ubuntu 21.04 supports this during installation. Whether these instructions are suitable for mirroring such a setup has not been tested. For Ubuntu 20.04, these instructions are not suitable for creating an encrypted ZFS boot disk, please use the full instructions linked above for that. You can, however, add an encrypted dataset after the fact: You could encrypt just the portion of your file system that holds secrets.

Note: If your use case is running docker instances, and not a full-fledged Ubuntu install, then take a look at TrueNAS SCALE

@DavidPesticcio
DavidPesticcio / Encrypted ZFS root install on Linux Mint 20.x & Ubuntu 20.04
Created February 22, 2021 14:13
Encrypted ZFS root install on Linux Mint 20.x & Ubuntu 20.04
### Steps for an encrypted ZFS root installation on Linux Mint 20.x & Ubuntu 20.04
01. Boot from an Ubuntu based installer/Live CD - Linux Mint 20.x or Ubuntu Desktop 20.04
02. Open a terminal
03. Run: `sudo apt -y install zfs-zed` - **!IMPORTANT!** - Ensure the ZFS pre-requisites installed!
04. Run: `sudo vi /usr/share/ubiquity/zsys-setup`
- find the right section with `/^init_zfs`
- prepend the `zpool create` for `rpool` with `echo MYPASSWORD | ` - `MYPASSWORD` **MUST** be 8 characters or more!
eg. `echo MYPASSWORD | zpool create -f \` - **DO NOT FORGET THIS!**
05. Above the last line of the `zpool create` command, insert these lines:
@DavidPesticcio
DavidPesticcio / manjaro-zfs-root.bash
Created January 27, 2021 13:24 — forked from rowlandwatkins/manjaro-zfs-root.bash
installation of manjaro zfs root
#!/bin/bash
# ===================================
# Origianly from https://forum.manjaro.org/t/solved-manjaro-16-06-01-zfs-root-installation-problem/4469
# ===================================
loadkeys us
systemctl enable --now systemd-timesyncd
pacman-mirrors --api --set-branch unstable --url http://ftp.cuhk.edu.hk/pub/Linux/manjaro
# ===================================

IBM ServeRAID M1015: crossflashing to a LSI9211-8i IR/IT Mode

Note: applicable to M1115 and similar LSI SAS2008 chips.

One of the most popular SAS 6.0gbps/ SATA III controllers for enthusiasts is the IBM M1015. In its native form, it is a very capable host bus adapter (HBA) based on the LSI SAS2008 chip. With the low price on places such as ebay (see here for an ebay search for the M1015) and an enthusiastic community that has learned to unlock many features, it has quickly become a go-to choice for low-cost SATA III connectivity. This series of articles was written by Pieter Schaar perhaps best known as the one behind laptopvideo2go.com. He has been a regular contributor in the STH forums and has been detailing his learning in threads such as these. I do want to note that these modifications are not endorsed by this site, LSI, IBM or others and the information herein is purely for educational purposes. If you do encounter problems, you are solely responsible for those consequences.

There are now

@DavidPesticcio
DavidPesticcio / wireguard_setup_readme.md
Last active November 1, 2020 23:34 — forked from daemonhorn/wireguard_pfsense_setup_readme.md
Wireguard on PFSense / Android / Linux

Preparation Steps:

Read other materials first to familiarize yourself with wireguard and wireguard on FreeBSD / Android: genneko has a nice writeup that is easy to follow and much better formatting here:

https://genneko.github.io/playing-with-bsd/networking/freebsd-wireguard-android/

Backup your entire pfsense system, or run this on a vm after a good snapshot. Failure to do this can easily break you, you have been warned. This is entirely unsupported. Wireguard on PFSense is experimental at this time. Nothing has been tested by me on non AMD64 arch, so unsure if arm pkgs are available. Backup your package database just in case since this impacts core PFSense runtime dependancies.

@DavidPesticcio
DavidPesticcio / docker-compose.yml
Created September 14, 2020 08:39 — forked from Mau5Machine/docker-compose.yml
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@DavidPesticcio
DavidPesticcio / dynamic.yaml
Created September 14, 2020 08:39 — forked from Mau5Machine/dynamic.yaml
Traefik Dynamic Configuration File
## Setting up the middleware for redirect to https ##
http:
middlewares:
redirect:
redirectScheme:
scheme: https
@DavidPesticcio
DavidPesticcio / string-split.awk
Created June 29, 2020 17:37
AWK: Splitting a string into sub-strings of length X
Using AWK to split a line of text into sub-strings:
To split a line of text at column X, followed by a new line (or whatever) - even if the input it less than a multiple of X.
If something other than a NEWLINE is desired substitute it, use "& " or "& value=" etc...
You may want to play around with BEGIN{} & END{} blocks if you plan on getting fancy.
Handy for reformatting a mangled SSH or GPG key!
DATA="$(dd if=/dev/urandom bs=512 count=1 | base64 -w0)"
by pipe