Skip to content

Instantly share code, notes, and snippets.

View emphazer's full-sized avatar

Christoph Hansen emphazer

  • NRW, Germany
View GitHub Profile
@angeloxx
angeloxx / modsec-clamscan.lua
Last active July 16, 2024 15:13
ModSecurity ClamAV integration script (LUA)
#!/usr/bin/lua
--[[
This script can be used to inspect uploaded files for viruses
via ClamAV. To implement, use with the following ModSecurity rule:
SecRule FILES_TMPNAMES "@inspectFile /opt/modsecurity/bin/modsec-clamscan.lua" "phase:2,t:none,log,deny"
Author: Angelo Conforti (based on Josh Amishav-Zlatin code)
Requires the clamav-server and clamav-scanner
@magnetikonline
magnetikonline / README.md
Last active November 4, 2025 13:51
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@magnetikonline
magnetikonline / README.md
Last active July 27, 2025 09:11
Nginx embedded variables.
@magnetikonline
magnetikonline / README.md
Last active February 8, 2024 03:35
Bash if expressions cheatsheet.
@magnetikonline
magnetikonline / README.md
Last active December 10, 2024 07:23
Subversion (SVN) to Git repository conversion notes.
@magnetikonline
magnetikonline / README.md
Last active May 22, 2020 18:55
SSH/Readline cheatsheet.

SSH/Readline cheatsheet

Under Emacs mode, typically the default for most shells.

Ctrl + B
Basic moves
Move back one character