Skip to content

Instantly share code, notes, and snippets.

View tschaefer's full-sized avatar

Tobias Schäfer tschaefer

View GitHub Profile
@tschaefer
tschaefer / README.md
Created March 19, 2024 21:00
Yubikey for Debian root on native encrypted ZFS

Information

Following instructions enable 2FA via Yubikey challenge-response for Debian root native encrypted ZFS.

For general setup please follow the instructions in the OpenZFS Documentation.

Prepare Yubikey

Install management tools.

@tschaefer
tschaefer / pryrc
Last active November 5, 2023 15:32
Pry user configuration
# frozen_string_literal: true
### Prompt
Color = Pry::Helpers::Text
name = 'zerowing'
description = <<~DESC
All your prompt are belong to us.👽
user@host:pry /path/to/obj »

Keybase proof

I hereby claim:

  • I am tschaefer on github.
  • I am toschaefer (https://keybase.io/toschaefer) on keybase.
  • I have a public key whose fingerprint is 120A 0549 D5A1 9CB4 6D07 650F 3C44 B15E B62A 13CC

To claim this, I am signing this object:

# General settings
severity = 3
verbose = %F (line:%l) %m, %e [%p]\n
include = CodeLayout Documentation InputOutput Modules::ProhibitMultiplePackages
exclude = CodeLayout::RequireTidyCode RegularExpressions::RequireExtendedFormatting Moose::RequireCleanNamespace Documentation::RequirePodLinksIncludeText Subroutines::ProhibitUnusedPrivateSubroutines
# Rules for POD
[Documentation::RequirePodSections]
lib_sections = NAME | DESCRIPTION | METHODS
script_sections = NAME | SYNOPSIS | OPTIONS | DESCRIPTION
@tschaefer
tschaefer / README.md
Last active June 9, 2019 17:34 — forked from mikoim/README.md
WireGuard example configuration for VPN

Server

iptables -A FORWARD -i wg0 -o YOUR_INTERFACE -s 10.200.200.0/24 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o YOUR_INTERFACE -s 10.200.200.0/24 -j MASQUERADE

Client

wg-quick up `pwd`/client.conf
#!/bin/bash
#
# hugepages_settings.sh
#
# Linux bash script to compute values for the
# recommended HugePages/HugeTLB configuration
#
# Note: This script does calculation for all shared memory
# segments available when the script is run, no matter it
# is an Oracle RDBMS shared memory segment or not.
@tschaefer
tschaefer / last.service
Created February 22, 2017 09:14
last systemd service in target
[Unit]
Description=Last Stuff
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/bin/do-last
RemainAfterExit=yes
[Install]
#!/bin/bash
export PERL5OPT=-MDevel::Cover
MOJO_CLIENT_DEBUG=1 prove -l lib -v --merge t/
unset PERL5OPT
cover
@tschaefer
tschaefer / fastcgi-perl-wrapper.service
Created September 26, 2016 20:12
FastCGI Perl Wrapper Systemd Unit File
[Unit]
Description=FastCGI Perl Wrapper
After=network.target
[Service]
Type=forking
TimeoutStopSec=0
User=www-data
Group=www-data
ExecStart=/usr/local/bin/fastcgi-perl-wrapper
@tschaefer
tschaefer / config.ovpn
Last active August 30, 2016 18:49
OpenVPN MacOS DNS
...
script-security 2
up bin/up.sh
down bin/down.sh
...