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 / autodiscover.xml
Created August 28, 2024 16:20 — forked from vgerbase/autodiscover.xml
Model for an Autodiscover XML response
<!-- RESPONSE FROM THE SERVER -->
<?xml version="1.0" encoding="utf-8" ?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<!-- Response: Required
This tag serves as an indication that the retrieved XML is an Autodiscovery Response
-->
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<!-- User: Optional
This tag gives user-specific information. Autodiscover must be UTF-8 encoded.
-->
@sitemapxml
sitemapxml / autodiscover.xml
Created August 28, 2024 16:19 — forked from vgerbase/autodiscover.xml
Autodiscover XML request POST
<?xml version="1.0" encoding="utf-8" ?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
<Request>
<AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>
<EMailAddress>[email protected]</EMailAddress>
</Request>
</Autodiscover>
@sitemapxml
sitemapxml / db-connect-test.php
Created August 16, 2024 15:49 — forked from M165437/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
@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 = [email protected] = all, !skipped
operator = [email protected] = 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"