Skip to content

Instantly share code, notes, and snippets.

View MeanTimeCyber's full-sized avatar

Mean Time Cybersecurity MeanTimeCyber

View GitHub Profile
@MeanTimeCyber
MeanTimeCyber / mp4togif.sh
Created April 25, 2026 07:38
Bash script to convert an mp4 video to a GIF using ffmpeg
#!/bin/bash
# check it exists
if test -f "$1"; then
echo "Converting $1"
else
echo "Can't find \"$1\""
exit -1
fi
# get the filename sans extension
@MeanTimeCyber
MeanTimeCyber / whatsmyip.sh
Last active April 25, 2026 07:37
bash script to detail the local and public IP
# !/bin/bash
# Name: whatsmyip.sh
# Description: A simple script to display the public IP address of the machine.
# Usage: chmod +x whatsmyip.sh && ./whatsmyip.sh
# Needs: dig (from dnsutils package) and https://github.com/MeanTimeCyber/ip-enrich
# Function to display local network information
display_local_ip() {
local local_ipv4=$(hostname -I | awk '{print $1}')
local local_ipv6=$(ip -6 addr show | grep 'inet6' | awk '{print $2}' | grep -v '^::1/' | head -n 1)