Skip to content

Instantly share code, notes, and snippets.

@EricZimmerman
EricZimmerman / Caddy_AuthCrunch.md
Last active May 12, 2025 17:52
Caddy and Authcrunch working example

After pulling everything together, I thought it would be a good idea to document what ended up working for me with the following setup:

  1. *darr apps
  2. Some 3d printers
  3. MobilRaker
  4. NZB360

This stack requires the following

  • Protecting the sites from unauthorized access
@TetraTsunami
TetraTsunami / !CaddyDockerProxyExample.md
Last active May 1, 2025 12:00
CaddyDockerProxy Authelia example

Folder structure:

/services
  /authelia
    docker-compose_authelia.yml # (Includes example service with auth)
  /caddy
    docker-compose_caddy.yml
    Dockerfile # Needed to add the CaddyDockerProxy extension
    Caddyfile # Needed to contain common configuration
@githubfoam
githubfoam / fortigate - webfilter - url filter cheat sheet
Last active April 22, 2025 08:54
fortigate - webfilter - url filter cheat sheet
#=====================================================================
# Log&Report - Security Events - Web Filter, filter a specific URL. v7.2.3
#launch CLI from fortigate GUI
config webfilter profile #Configure Web filter profiles
get #list all profiles
edit profile-name
show # see current setting
set log-all-url enable
set extended-log enable
@Ruzgfpegk
Ruzgfpegk / mxtsessions_format.md
Last active February 4, 2025 20:17
.mxtsessions file format

.mxtsessions file format

Introduction

This document tries to give a description of the .mxtsession files used in the proprietary software MobaXterm. Sadly this format, as efficient as it is, is too obscure to encourage legitimate use cases of this format as there is no public documentation available.

The software licence of MobaXterm, for both Home and Pro editions, allows to "observe, study or test the functioning of the Software in order to determine the ideas and principles which are the basis of the Software, when performing the loading, display, execution, transmission or storage of the Software" and this study has been done in full under those terms.

The studied format is the one of version 23.6: sessions last modified (but not necessarily exported) before this version will have fewer fields.

@ryanfb
ryanfb / mbox-size.rb
Created July 11, 2022 21:49
Get the total number of bytes used for each sender in an Mbox email file
#!/usr/bin/env ruby
emails = {}
email_length = 0
last_email_from = nil
File.open(ARGV[0], "r:ASCII-8BIT").each_line do |line|
if line.start_with?('From ')
unless last_email_from.nil?
emails[last_email_from] ||= 0
@othyn
othyn / guide.md
Last active May 12, 2025 21:59
Fix horrendously bad macOS (12.3.1 tested) SMB (Samba) performance on Unraid

Intro

Out of the box, my SMB performance on macOS 12.3.1 would top out at around 20MB/s in short ~5 second bursts, which was absolutely horrendous, slow to navigate in Finder and slugish to interact with.

Since making these changes, I now get sustained ~80-100MB/s+ and instant Finder navigation which is superb and how things should be out-of-the-box (OOTB)!

May 2023 update: As of Ventura, the SMB issues were just horribly inconsistent and hard to maintain. Something in the combination of Unraid, macOS and SMB just doesn't play nice. I ended up binning NFS/SMB all together and heading to a locally hosted Nextcloud instance for file syncing, then using SFTP/Ansible Git flow for editing files within appdata.

Sources

@thegreatestminer
thegreatestminer / encoded-20201212150102.txt
Created December 12, 2020 15:01
MobaXTerm Professional x64 License Key [READ COMMENTS]
UEsDBBQAAAAIABNQjFGCf/GfLgAAACwAAAAHAAAAUHJvLmtleTMqdncpCXQOKDAp9woMzEo1MTVOrHAzTjTLME7VNs1LK8owTjQpcU8tcuLlAgBQSwECFAAUAAAACAATUIxRgn/xny4AAAAsAAAABwAAAAAAAAAAAAAAAAAAAAAAUHJvLmtleVBLBQYAAAAAAQABADUAAABTAAAAAAA=
@felddy
felddy / no-aaaa.py
Last active August 9, 2023 23:56 — forked from FiloSottile/no-aaaa.py
Unbound python-script to block AAAA records of Netflix domains.
def init(id, cfg):
return True
def deinit(id):
return True
def inform_super(id, qstate, superqstate, qdata):
return True
domains = [
###
# Feel free to use if it helps.
# Forked from all over the place.
###
###############################################################################
# INPUT PLUGINS #
###############################################################################
## ------------------------------------------- ##
@mowings
mowings / cron_docker.md
Last active March 27, 2025 07:53
Run cron on docker with job output directed to stdout

You'd like a docker container that runs cron jobs, with the output of those cron jobs going to stdout so they are accessible as docker logs. How do you do that?

Install cron, and set it up to run in the foreground

In your Dockerfile, apt-get -y install cron Use apk or whatever if you are running on alpine or another distribution Set the command or entrypoint in your Dockerfile to run cron 9n the foreground

ENTRYPOINT ["/usr/sbin/cron", "-f"]