Skip to content

Instantly share code, notes, and snippets.

View jandahl's full-sized avatar

Jan Gronemann jandahl

  • Spacepope
  • Denmark
View GitHub Profile
# Made for bash, assumes you have a working rancid/clogin set up
#
# Point the below to your local copy of the list
OUIList=~/oui.txt
if [ ! -c $OUIList ]
then ## Check if $OUIList exists, if not, download and save it
# touch $OUIList
echo "Fetching the OUI list. This might take a little while. Like, 2 minutes."
@jandahl
jandahl / GNUscreen-OSX-slowpaste.md
Last active April 17, 2023 13:35
Using GNU screen as a slow pasting virtual serial console terminal

Using GNU screen as a slow pasting virtual serial console terminal

A quick primer

You will need

  1. A Macintosh computer
  2. A USB-to-serial adapter
  3. A file with a config you want to paste sloooowly
  4. A few minutes

1. Make a sensible ~/.screenrc file

"AF": { explanationText: "Atomic Function" }
"AIS": { explanationText: "Alarm Indication Signal" }
"ALM": { explanationText: "Alarm reporting" }
"AP": { explanationText: "Access Point" }
"API": { explanationText: "Access Point Identifier" }
"AR": { explanationText: "Availability Ratio" }
"ARC": { explanationText: "Alarm Reporting Control" }
"AST": { explanationText: "Alarm Status function" }
"ASY": { explanationText: "Alarm Synchronization function" }
"AvFb": { explanationText: "Bidirectional Availability Filter function" }
// ==UserScript==
// @name Don't track my clicks, reddit
// @namespace http://reddit.com/u/OperaSona
// @author OperaSona
// @match *://*.reddit.com/*
// @grant none
// ==/UserScript==
var a_col = document.getElementsByTagName('a');
var a, actual_fucking_url;
#!/usr/bin/env bash
function aboutMe {
echo -e "\n\t$scriptName, v $scriptVersion"
echo -e "\n\tExamples:"
echo -e "\n\t$scriptFile \033[1;31mcurl\033[1;0m"
echo -e "\t$scriptFile \033[1;31msnmpdelta\033[1;0m\n"
echo -e "\n\tGenerates a rich text man page for you and opens it in Preview"
}
scriptFile=$(basename "$0")
@jandahl
jandahl / dns.sh
Last active August 25, 2016 07:31
Use zone transfer to search for subdomains
#!/usr/bin/env bash
function aboutMe() {
echo -e "\n\t${scriptName}, v ${scriptVersion}"
echo -e "\n\tLooks through the ${lookupDomain} domain for what you want"
echo -e "\n\tTreats spaces as '.*'"
echo -e "\n\tExamples:"
echo -e "\n\t${scriptFile}${Emphasize} rt vrdb${ColorOff} will match rt01.vrdb"
echo -e "\t${scriptFile}${Emphasize} wireshark${ColorOff}\n"
# echo -e "(behind the scenes, it's a fancy ${Emphasize} dig -t AXFR tekdom.local | grep${ColorOff})\n"
@jandahl
jandahl / updowntracker.sh
Last active August 26, 2016 15:47
Uptime-and-downtime-logger
#!/usr/bin/env bash
scriptFile=$(basename "${0}")
scriptName="Uptime-and-downtime-logger"
scriptVersion="2016-08-26 JAGR"
defaultPingTimer=4
targetIP=${1}
if [ -z "${2}" ]; then
pingTimer=${defaultPingTimer}

Keybase proof

I hereby claim:

  • I am jandahl on github.
  • I am jgronemann (https://keybase.io/jgronemann) on keybase.
  • I have a public key ASBeZuaC6PWQ_TioUFpaU8XUryEC4NXnDoxt4bqJVgplWAo

To claim this, I am signing this object:

@jandahl
jandahl / findpi.py
Last active November 10, 2016 08:57
Search for rpis based on name, ssh to first hit; assumes 'eth' is the var that controls which interface to check arp of
#!/usr/bin/env python3
# imports
import netifaces
import os
import subprocess
def main():
eth = 'en9'
javascript: (function(n, t) {
t['true'] = n;
var i = function(n, t, i) {
var r = n.style;
r.webkitTransition = r.transition = i + 's';
r.webkitTransitionTimingFunction = r.TransitionTimingFunction = 'ease-in-out';
r.webkitTransform = r.Transform = 'translate3d(0, ' + -t + 'px, 0)'
};
var r = function() {
var n = [].slice.call(arguments);