Skip to content

Instantly share code, notes, and snippets.

@biophonc
biophonc / caddy-wp-login.conf
Created April 28, 2022 11:45
Fail2Ban filter for structured logs from Caddy for WordPress login atemps
#
# matches structured logs emitted by caddy 2.5.0+
# requires Fail2Ban v0.11.0+ because of the unix timestamp aka "Epoch"
#
# test regex: {"level":"info","ts":1651134734.5565865,"logger":"http.log.access.log1","msg":"handled request","request":{"remote_ip":"98.42.231.11","remote_port":"40578","proto":"HTTP/1.1","method":"POST","host":"redacted.foo","uri":"/wp-login.php","headers":{"Accept-Encoding":["gzip"],"Connection":["close"],"User-Agent":["Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36"],"Content-Length":["88"],"Content-Type":["application/x-www-form-urlencoded"],"Cookie":[]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"","server_name":"kgparl.de"}},"user_id":"","duration":0.214159319,"size":2739,"status":200,"resp_headers":{"Content-Encoding":["gzip"],"Alt-Svc":["h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"],"Cache-Control":["no-cache, must-revalidate, max-age=0, no-store"],"Content-Type":["text/html; chars

Keybase proof

I hereby claim:

  • I am biophonc on github.
  • I am biophonc (https://keybase.io/biophonc) on keybase.
  • I have a public key ASAr6BJl7N93zGEuMgUEGkXCqslCbenDAjBssqsPwbP0qwo

To claim this, I am signing this object:

@biophonc
biophonc / vagrant virtualbox vm to vmwarefusion.md
Last active October 19, 2022 16:40
Migrate Vagrant VirtualBox VM to VMware Fusion

Migrate Vagrant VirtualBox VM to VMware Fusion

Notes:

  • Unfortunately the process is not as simple as I'd have expected it, that's why I wrote this little step-by-step instruction.
  • My setup is/was:
    • OSX 10.9.4
    • VirtualBox 4.3.12
    • VMware Fusion 6.0.4
    • OS as VM to migrate: Ubuntu 10.04.4 LTS
# @see: https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
((factory) ->
if typeof define is 'function' && define.amd
# AMD. Register as anonymous module.
define ['jquery'], factory
return
else
# Browser globals.
factory jQuery
return