Skip to content

Instantly share code, notes, and snippets.

View jandahl's full-sized avatar

Jan Gronemann jandahl

  • Spacepope
  • Denmark
View GitHub Profile
@jandahl
jandahl / section.sh
Last active November 5, 2021 11:45
bash pipe to section
function section() {
sed -n "/${*}/,/^$/p"
}
#!/usr/bin/env bash
function aboutMe() {
printf "\n\t%s, ver %s" "${scriptName}" "${scriptVersion}"
printf "\n\tTries to acces the supplied IP or FQDN via several methods."
printf "\n\tDoesn't care about IPv6."
printf "\n\n\tExample:"
printf "\n\t\t%s %s example.com%s" "${scriptFile}" "${Emphasize}" "${ColorOff}"
printf "\n\t\t%s %s example.com example.org%s" "${scriptFile}" "${Emphasize}" "${ColorOff}"
printf "\n\n\tAlso has a built-in retry timer, using -r! (Note: only way to get out is killing the terminal)"
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);
@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'

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 / 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}
@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"
#!/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")
// ==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;
"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" }