Skip to content

Instantly share code, notes, and snippets.

View qlyoung's full-sized avatar
🐈
thinking about bingus

Quentin Young qlyoung

🐈
thinking about bingus
View GitHub Profile
@qlyoung
qlyoung / rr-with-frr.md
Last active December 10, 2021 19:13
Using RR debugger with FRR

https://rr-project.org/

Useful to help debug intermittent FRR issues, or problems which only reproduce under certain network conditions that are difficult to recreate.

  1. Install daemonize
  2. Edit /etc/frr/daemons and set the following as a wrap command for the daemons you want:
@qlyoung
qlyoung / scapy-pim.txt
Created April 6, 2021 21:54
pim routers hate this one simple trick
# establish neighbor
sendp(Ether()/IP(dst="224.0.0.13")/PIMv2Hdr()/PIMv2Hello()/PIMv2HelloHoldtime(holdtime=65535)
# join group
sendp(Ether()/IP(dst="224.0.0.13")/PIMv2Hdr()/PIMv2JoinPrune(num_group=1, jp_ips=[PIMv2GroupAddrs(gaddr='224.0.171.18', num_joins=1, join_ips=[PIMv2JoinAddrs(src_ip='255.255.255.255', wildcard=1, rpt=1)])]), iface="veth1")
@qlyoung
qlyoung / debug.txt
Created March 25, 2021 03:56
Vagrant debug gist
INFO global: Vagrant version: 2.2.15.dev
INFO global: Ruby version: 2.7.2
INFO global: RubyGems version: 3.2.13
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_NO_PLUGINS="1"
INFO global: VAGRANT_DISABLE_PLUGIN_INIT="1"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /home/qlyoung/projects/vagrant/plugins/commands/autocomplete/plugin.rb
INFO manager: Registered plugin: autocomplete command
DEBUG global: Loading core plugin: /home/qlyoung/projects/vagrant/plugins/commands/box/plugin.rb
@qlyoung
qlyoung / openbmp-quick-setup.txt
Last active February 12, 2021 23:42
OpenBMP no bs setup
docker pull openbmp/aio
docker run -d -e API_FQDN=localhost.lan \
--name=openbmp_aio -e MEM=15 \
-p 3306:3306 -p 2181:2181 \
-p 9092:9092 -p 5000:5000 \
-p 8001:8001 openbmp/aio
# wait a few minutes for mysql to initialize itself
# Monitor logs:
# docker exec openbmp_aio tail -f /var/log/openbmpd.log
@qlyoung
qlyoung / bgpd-flamegraph.sh
Created December 7, 2020 06:39
generate flamegraph for bgpd, from startup to first eor rx
#!/bin/bash
# Perf flamegraph for bgpd
# Run as root
# Don't run this on an untrusted system lol
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
tmplog=$(mktemp)
@qlyoung
qlyoung / chasepdf2csv
Last active November 13, 2020 00:45 — forked from ivy/chasepdf2csv
Convert Chase credit card statements from PDF to CSV. Works with Chase CC statements as of 11/2020
#!/usr/bin/env ruby
# chasepdf2csv -- Convert Chase credit card statements from PDF to CSV. Written
# to easily import older statements into QuickBooks Online/Self-Employed. Chase
# unfortunately only offers statements up to 6 months in the past, making it a
# huge chore to synchronize past transactions.
#
# How to Use
# ----------
# This script requires Ruby >2.0.0 and pdftotext. Copy this script somewhere and
# make it executable. Run it like any other command.
@qlyoung
qlyoung / gist:2e2da474a346678c68ae85adf8d7825c
Created November 9, 2020 21:40
linux sysfs topology info
/sys/devices/system/cpu/cpu*/topology
@qlyoung
qlyoung / echovr_starter.py
Last active September 9, 2020 00:50
Starter script for accessing Echo VR API
#!/usr/bin/env python3
#
# Starter script for programmatic access of Echo VR API
# Copyright (C) 2020 Quentin Young
#
# Public domain, all rights released
#
# To run:
# python echovr_starter.py
#
@qlyoung
qlyoung / gist:a8ad8417f38c8d3df526d22e54faec5a
Created August 30, 2020 07:23
Procedure for importing data from Shearwater Teric to Subsurface on Windows 10
- In Windows, open Settings -> Bluetooth & other devices
- If Teric has been paired before, click it and click "Remove device"
- Open Subsurface, go to Import -> From Dive Computer
- In Windows Settings, click Add Bluetooth or other device -> Bluetooth
- On Teric, initiate Bluetooth mode (it seems it only sends one beacon at
startup, so Windows must be listening on the adapter first)
- Pair the Teric when it appears in the Windows panel
- Go to Subsurface, select the Teric as the model, and click "Download"
- If it fails, repeat all steps; sometimes it only works on the second try
@qlyoung
qlyoung / sample-bsm-crash-logs.txt
Created April 6, 2020 15:29
PIM bsm crash logs
2020/03/29 18:25:08 warnings: PIM: pim_parse_addr_group: unknown group address encoding family=0 mask_len=0 from
2020/03/29 18:25:08 warnings: PIM: pim_tlv_parse_holdtime: PIM hello holdtime TLV with incorrect value size=173 correct=2 from 0.1.0.173 on interface fuzziface
2020/03/29 18:25:08 warnings: PIM: pim_tlv_parse_holdtime: PIM hello holdtime TLV with incorrect value size=173 correct=2 from 0.1.0.173 on interface fuzziface
2020/03/29 18:25:08 warnings: PIM: pim_tlv_parse_holdtime: PIM hello holdtime TLV with incorrect value size=173 correct=2 from 0.1.0.173 on interface fuzziface
2020/03/29 18:25:08 warnings: PIM: pim_tlv_parse_holdtime: PIM hello holdtime TLV with incorrect value size=173 correct=2 from 0.1.0.173 on interface fuzziface
2020/03/29 18:25:08 warnings: PIM: pim_tlv_parse_holdtime: PIM hello holdtime TLV with incorrect value size=173 correct=2 from 0.1.0.173 on interface fuzziface
2020/03/29 18:25:08 warnings: PIM: pim_tlv_parse_holdtime: PIM hello holdtime TLV with incorrect value size=173