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
@eggplants
eggplants / ALT-SH.md
Last active May 10, 2024 14:59
List of alternative shell-scripting languages (or shells)

Alternative shell-scripting languages (or shells)

  • sorted by repo name [a-z]

amirbawab/BashClass

BashClass is an Object Oriented Programming language that compiles to BASH 4.4

@ychaouche
ychaouche / Spamassassin rules description
Last active May 1, 2024 21:50
Spamassassin rules description
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
@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active May 6, 2024 19:22
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active May 16, 2024 21:26
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.

@ChrisHardie
ChrisHardie / multisite_attachment_url.php
Created March 18, 2019 01:27
Example WordPress plugin to help simplify attachment URLs on multisite sites with mapped domains
<?php
/**
* Plugin Name: Multisite Domain Mapping Attachment URL Fixes
* Description: Update attachment URLs to use mapped domain and remove mention of "sites" path.
* Author: Chris Hardie
*
* Rewrite attachment URLs (and related srcset URLs) to the non-multisite, mapped domain version if a domain is mapped
* Requires that the related nginx config that maps the non-multisite URL to the multisite URL be in place
**/
add_filter( 'wp_get_attachment_url', 'jch_attachment_url_with_domain_mapping' );
@vpnwall-services
vpnwall-services / bacula-compile.sh
Last active January 23, 2024 22:55
[Install Bacula From Sources] Compile and install Bacula tools from sources #backup #bacula #linux #debian #compile #install #latest
#!/bin/bash
#VERSION="9.4.2"
#apt-get install -y build-essential libreadline6-dev zlib1g-dev liblzo2-dev mt-st mtx postfix libacl1-dev libssl-dev libmysql++-dev mysql-server
#mkdir /tmp/bacula
#cd /tmp/bacula
#wget https://sourceforge.net/projects/bacula/files/bacula/$VERSION/bacula-$VERSION.tar.gz
#cd /usr/src/bacula*
#./configure --with-readline=/usr/include/readline --disable-conio --bindir=/usr/bin --sbindir=/usr/sbin --with-scriptdir=/etc/bacula/scripts --with-#working-dir=/var/lib/bacula --with-logdir=/var/log --enable-smartalloc --with-mysql --with-archivedir=/mnt/backup --with-job-email=your@email.com.br --#with-hostname=ip_or_qualified_name
#make -j8 && make install && make install-autostart
#chmod o+rx /etc/bacula/scripts/*
@pavankjadda
pavankjadda / How to fix gitignore not working issue.md
Last active May 9, 2024 06:13
How to fix "gitignore not working" issue

FYI: Created blog post with more details

How to fix ".gitignore not working" issue?

Sometimes git does not exclude files/folders added .gitignore especially if you had commited them before. Here is how to fix it. I am ignoring node_modules from Angular project as an example

  1. Update .gitignore with the folder/file name you want to ignore. You can use anyone of the formats mentioned below (prefer format1)
### Format1  ###
node_modules/
@bencholmes
bencholmes / count_colour_pages.sh
Created January 21, 2019 16:54
A bash script to count the number of pages in a PDF and how many are colour/black&white
FILENAME="$1"
# https://stackoverflow.com/questions/1672580/get-number-of-pages-in-a-pdf-using-a-cmd-batch-file
# Uses pdfinfo to find general information, focusing on the number of pages from which only the number is extracted.
NPAGES=$(pdfinfo "$FILENAME" | grep Pages | sed 's/[^0-9]*//')
# https://root42.blogspot.com/2012/10/counting-color-pages-in-pdf-files.html
# Uses ghostscript to measure any deviation from black in the ink colour used on pages.
GHOSTOUT=$(gs -o - -sDEVICE=inkcov $FILENAME | grep -v "^ 0.00000 0.00000 0.00000" | grep "^ " | wc -l)
@juampynr
juampynr / CHANGELOG.md
Created March 27, 2018 09:35
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as

@ammarshah
ammarshah / all_email_provider_domains.txt
Last active May 17, 2024 00:32
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org