Skip to content

Instantly share code, notes, and snippets.

View andrewkroh's full-sized avatar

Andrew Kroh andrewkroh

View GitHub Profile
# Anonymize IPTABLES logs for documentation!
import os
import re
import sys
random_macs = set()
macs = {}
@andrewkroh
andrewkroh / elastic-beat-development-101.md
Last active March 17, 2022 02:43
Elastic Beat Development 101

Elastic Beats Development 101

This is a short guide to get up and building Elastic Beats on a new Linux host.

Start a VM

This uses Google Compute Engine (GCE) to start an Ubuntu 20.04 virtual machine. You can use other versions of Linux or different virtualization platforms (or no virtualization), but those are not guaranteed to work with the commands here.

 gcloud auth login
@soloradish
soloradish / vault_logrotate
Created September 12, 2018 02:25
logrotate setting file for HashiCorp's Vault audit file
# Change the path below to your own audit log path.
/var/log/vault/audit.log {
rotate 30
daily
# Do not execute rotate if the log file is empty.
notifempty
missingok
compress
# Set compress on next rotate cycl to prevent entry loss when performing compression.
delaycompress
@vitalymak
vitalymak / kill-gpg-agent.sh
Created July 26, 2017 09:25
Kill gpg-agent
gpgconf --kill gpg-agent
# You shouldn’t need to manually restart it. GPG will restart it when it’s needed.
@pamelafox
pamelafox / browser.js
Created February 13, 2013 17:35
Browser banner warning
(function(wndw) {
var Browsers, OS, Platform, Versions, browser_name, browser_version, os, platform;
Versions = {
Firefox: /firefox\/([\d\w\.\-]+)/i,
IE: /msie\s([\d\.]+[\d])/i,
Chrome: /chrome\/([\d\w\.\-]+)/i,
Safari: /version\/([\d\w\.\-]+)/i,
Ps3: /([\d\w\.\-]+)\)\s*$/i,
Psp: /([\d\w\.\-]+)\)?\s*$/i
};