Skip to content

Instantly share code, notes, and snippets.

View briandoesdev's full-sized avatar

Brian Heidrich briandoesdev

View GitHub Profile
---
# Source: elastic-agent/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: elastic-agent
labels:
helm.sh/chart: elastic-agent-0.1.0
app.kubernetes.io/name: elastic-agent
app.kubernetes.io/instance: elastic-agent
@briandoesdev
briandoesdev / README.md
Created March 30, 2023 16:46 — forked from EmilePerron/README.md
Troubleshooting issues with Coraza WAF / ModSecurity

Troubleshooting issues with Coraza WAF / ModSecurity

If a request receives an HTTP 403 Unauthorized response, and you know your project's code isn't triggering the error, the most likely explanation is that the firewall is blocking your request.

If that's the case, take a look at the Caddy logs and you'll see the errors.

project-php-1 | {"level":"error","ts":1666882916.7945118, ...
@briandoesdev
briandoesdev / DumbSpamFilter.js
Created October 3, 2022 16:30 — forked from cfeduke/DumbSpamFilter.js
Gmail spam is entirely out of control in 2022
// hah silly human # is for Python comments!
// created in Google Apps Script and scheduled to run every minute
function processInboxEmailSubjects() {
var threads = GmailApp.search("is:unread newer_than:1d -label:spam")
Logger.log("Examining " + threads.length + " threads for spam by checking the subject line")
for (var i = 0; i < threads.length; i++) {
var subject = threads[i].getFirstMessageSubject()
const regex = /confirmation#/i
let isSpam = regex.test(subject)
// TODO other tests as necessary for your particular spam hell