Skip to content

Instantly share code, notes, and snippets.

View mschmitt's full-sized avatar
🥾
Busier than a one-legged man in an ass-kicking contest.

Martin Schmitt mschmitt

🥾
Busier than a one-legged man in an ass-kicking contest.
View GitHub Profile
all:
rm -f Esperanto.mp4
rm -f JPG/Esperanto*.jpg
rm -f PDF/Esperanto.pdf
install -d JPG
install -d PDF
install -d ${HOME}/.local/share/fonts/
install TTF/Inkfree.ttf ${HOME}/.local/share/fonts/Inkfree.ttf
install TTF/Arial.ttf ${HOME}/.local/share/fonts/Arial.ttf
cd PDF && /usr/bin/soffice --headless --convert-to pdf ../Esperanto.odp
I've played a bit with that ETL format and found a way to convert it into a hexdump format that imports into Wireshark super cleanly, with missing timestamps as the only drawback.
Be sure to override the Packet Capture Provider's truncation limit as described below.
Convert the Event Trace Log to XML:
tracerpt trace.etl -> Will write dumpfile.xml
Extract the Fragment contents from the XML file:
@mschmitt
mschmitt / steam_login.sh
Created December 21, 2019 23:09
steam_login.sh - proof of concept for automatically logging in to Steam
#!/bin/bash
# Wrapper for verbose exiting
function errexit(){
echo "Error: $1"
exit 1
}
# Check for availability of external prerequisites
[[ -x "$(command -v curl)" ]] || errexit "curl is required but not installed"
@mschmitt
mschmitt / decode_base64_log
Created October 24, 2019 09:41
Decoder for a file/log that contains Base64-encoded words
#!/usr/bin/perl -w
use strict;
use diagnostics;
use MIME::Base64;
# Decoder for a file/log that contains Base64-encoded words
binmode STDIN, ':utf8';
binmode STDOUT, ':utf8';
@mschmitt
mschmitt / Digispark_SysRQ.md
Last active January 25, 2023 08:22
Sketch for the Digispark to send REISUB emergency boot sequence to a Linux host.
@mschmitt
mschmitt / condensepath.sh
Created June 29, 2019 08:07
shorten a given pathname by compressing all /paths/leading/to/pathname into single character /p/l/t/pathname
#!/bin/bash
# shorten a given pathname by compressing all
# /paths/leading/to/pathname into single character /p/l/t/pathname
function condensepath {
local PATHNAME="$1"
local REGEX='(.*/)(.)[^/]+(/.+)'
# https://stackoverflow.com/a/22261454
while [[ "$PATHNAME" =~ $REGEX ]]
@mschmitt
mschmitt / myap.cgi
Last active March 30, 2019 08:52
CGI script to extract the client's currently used wifi access point from the Unifi Controller's RESTful API
#!/bin/bash
# https://ubntwiki.com/products/software/unifi-controller/api
UNIFI_BASE="https://localhost:8443"
UNIFI_USER="readonly"
UNIFI_PASS="password"
echo "content-type: text/plain; charset=utf-8"
echo "Refresh: 10"
@mschmitt
mschmitt / Alienware-m15.ahk
Created March 13, 2019 12:22
Alienware m15 Macro Key Mapping
; Alienware-m15.ahk
;
; Map Alienware m15 Macro keys 1-4 to arbitrary keypresses, without
; the use of Alienware Control Center.
;
; Macro Key 1
SC112::
SendInput {F13}
return
#!/bin/sh
echo /usr/sbin/freebsd-update --not-running-from-cron fetch
/usr/sbin/freebsd-update --not-running-from-cron fetch | cat
echo /usr/sbin/freebsd-update install
/usr/sbin/freebsd-update install | cat
echo /usr/sbin/pkg check
/usr/sbin/pkg check
@mschmitt
mschmitt / MIT LICENSE
Last active November 18, 2019 06:35 — forked from dmur/MIT LICENSE
Attractively wrapped 80-col MIT license
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#