Skip to content

Instantly share code, notes, and snippets.

View sitemapxml's full-sized avatar
🏠
Working from home

sitemapxml

🏠
Working from home
View GitHub Profile
@sitemapxml
sitemapxml / mnt-mymountpoint.mount
Created April 7, 2024 22:18 — forked from proprietary/mnt-mymountpoint.mount
systemd automount sshfs: how to automatically mount a remote sshfs filesystem with systemd
# Change the relevant {{ PARTS OF THIS FILE }} for your remote address etc.
# Make sure this unit file is named similarly to your mountpoint; e.g., for /mnt/mymountpoint name this file mnt-mymountpoint.mount
# On Ubuntu:
# $ sudo cp mnt-mymountpoint.mount /lib/systemd/system/
# $ sudo systemctl enable mnt-mymountpoint.mount
# $ sudo systemctl start mnt-mymountpoint.mount
# On Fedora:
# $ sudo cp mnt-mymountpoint.mount /etc/systemd/system
# $ sudo systemctl enable mnt-mymountpoint.mount
# $ sudo systemctl start mnt-mymountpoint.mount
1 AC_BR_BONANZA Too many newlines in a row... spammy template
2 ACCESSDB Message would have been caught by accessdb
3 ACCT_PHISHING_MANY Phishing for account information
4 AC_DIV_BONANZA Too many divs in a row... spammy template
5 AC_FROM_MANY_DOTS Multiple periods in From user name
6 AC_HTML_NONSENSE_TAGS Many consecutive multi-letter HTML tags, likely nonsense/spam
7 AC_POST_EXTRAS Suspicious URL
8 AC_SPAMMY_URI_PATTERNS10 link combos match highly spammy template
9 AC_SPAMMY_URI_PATTERNS11 link combos match highly spammy template
10 AC_SPAMMY_URI_PATTERNS12 link combos match highly spammy template
@sitemapxml
sitemapxml / bacula-dir.conf
Created March 28, 2024 23:35 — forked from skarllot/bacula-dir.conf
Bacula configuration to use sendEmail
. . .
Messages {
Name = Standard
mailcommand = "/usr/local/bin/sendEmail-backup \"[BACKUP] %t %e of %n %l\" \"%r\""
operatorcommand = "/usr/local/bin/sendEmail-backup \"[BACKUP] Intervention needed for %j\" \"%r\""
mail = backup-handlers@example.com = all, !skipped
operator = backup-operator@example.com = mount
console = all, !skipped, !saved
append = "/var/log/bacula/bacula.log" = all, !skipped
catalog = all
@sitemapxml
sitemapxml / Vagrantfile
Created April 25, 2023 19:18
Vagrantfile example (Ubuntu Bionic64)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@sitemapxml
sitemapxml / cloudflare-apache.conf
Last active July 14, 2022 17:02
Allow access from CloudFlare IP range only.
Source: https://stackoverflow.com/questions/65448093/allowing-only-cloudflare-i-p-range-through-htaccess-giving-403-error
#path to your website
<Directory "path/to/public_html/or/var/www/html">
#ipv4
Require ip 173.245.48.0/20
Require ip 103.21.244.0/22
Require ip 103.22.200.0/22
Require ip 103.31.4.0/22
Require ip 141.101.64.0/18
#!/bin/bash
# Add any services to be watched by the watchdog to the SERVICE_LIST
# Format of the service list: "Display Name" "Service Name" "semicolon delimited list of watchdog arguments"
SERVICE_LIST=(
"LiteSpeed" "lsws" "lsws;web;litespeed;openlitespeed"
"MariaDB" "mariadb" "mariadb;database;mysql"
"PowerDNS" "pdns" "powerdns;dns"
"Dovecot" "dovecot" "dovecot;imap;pop3"
"PostFix" "postfix" "postfix;smtp"
@sitemapxml
sitemapxml / GitConfigHttpProxy.md
Created May 30, 2022 21:55 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@sitemapxml
sitemapxml / full-disk-encryption-arch-uefi.md
Created May 20, 2022 22:10 — forked from huntrar/full-disk-encryption-arch-uefi.md
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@sitemapxml
sitemapxml / build_nginx.sh
Created March 6, 2022 18:01 — forked from MattWilcox/build_nginx.sh
Fetch, build, and install the latest nginx with the latest OpenSSL for RaspberryPi
#!/usr/bin/env bash
# names of latest versions of each package
export VERSION_PCRE=pcre-8.38
export VERSION_OPENSSL=openssl-1.0.2d
export VERSION_NGINX=nginx-1.9.7
# URLs to the source directories
export SOURCE_OPENSSL=https://www.openssl.org/source/
export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/