Skip to content

Instantly share code, notes, and snippets.

View Mearman's full-sized avatar

Joseph Mearman Mearman

View GitHub Profile
@Mearman
Mearman / useful_bash_alias.sh
Created September 21, 2021 10:01
A place for me to put useful Bash scripts or Shell snippets
#!/bin/bash
# A command to continuously watch the output of the DIG command whilst waiting for DNS propogation
alias digwatch='function __digwatch() { watch dig +nocmd "$*" any +multiline +noall +answer ; unset -f __digwatch; }; __digwatch'
@Mearman
Mearman / my-unifi-cam-proxy.xml
Last active February 24, 2022 16:48
my-unifi-cam-proxy.yml
<?xml version="1.0"?>
<Container version="2">
<Name>unifi-cam-proxy</Name>
<Repository>keshavdv/unifi-cam-proxy</Repository>
<Registry>https://hub.docker.com/r/keshavdv/unifi-cam-proxy/</Registry>
<Network>host</Network>
<MyIP />
<Shell>sh</Shell>
<Privileged>false</Privileged>
<Support>https://hub.docker.com/r/keshavdv/unifi-cam-proxy/</Support>
@Mearman
Mearman / macOS_voice_test.sh
Last active June 2, 2022 12:24
MacOS Voice Test
#!/bin/bash
# exit if not running on a MacOS system
if [ "$(uname)" != "Darwin" ]; then
echo "This script is for MacOS only"
exit 1
elif [[ $(sw_vers -productVersion) < "10.10" ]]; then
# check if system version from "sw_vers -productVersion" is 10.10 or higher
echo "This script is for MacOS 10.10 or higher only"
echo "Your system appears to be $(sw_vers -productVersion)"
exit 1
@Mearman
Mearman / Obsidian Snippets
Last active October 17, 2025 02:48
Obsidian Snippets
A collection of snippets
@Mearman
Mearman / download_excalidrawlib.sh
Last active June 15, 2022 16:56
Download Excalidraw excalidrawlib files
#!/bin/bash -e
LIBRARY_PAGE="https://libraries.excalidraw.com/?sort=downloadsTotal"
mkdir -p excalidrawlib || true
cd excalidrawlib
declare -a URLS=("
https://libraries.excalidraw.com/libraries/youritjang/software-architecture.excalidrawlib
https://libraries.excalidraw.com/libraries/youritjang/stick-figures.excalidrawlib
https://libraries.excalidraw.com/libraries/drwnio/drwnio.excalidrawlib
@Mearman
Mearman / DeckLoader.sh
Last active December 5, 2022 23:16
DeckRomLoader
#!/bin/bash -e
set -o pipefail
ENABLE_SCRAPE_UPDATE=FALSE
ENABLE_DOWNLOAD=TRUE
ROM_DIR="/home/deck/Emulation/roms"
ENABLE_OPEN_TXT=TRUE
GIST_URL="https://gist.githubusercontent.com/Mearman/52076c8457a55670d46bb1305dc985b4/raw/DeckLoader.sh"
# if skip-update flag is set, then skip updating DeckLoader.sh
@Mearman
Mearman / ben_down.sh
Created December 6, 2022 11:09
ben_down.sh
#!/bin/bash -ex
set -o pipefail
ROM_DIR="/home/deck/Emulation/roms"
GBA_DIR="$ROM_DIR/gba"
PS2_DIR="$ROM_DIR/ps2"
declare -a GBA_LINKS=("https://archive.org/download/nointro.gba/Final%20Fantasy%20Tactics%20Advance%20%28Europe%29%20%28En%2CFr%2CDe%2CEs%2CIt%29%20%28Virtual%20Console%29.7z")
TEMP_DIR="~/Downloads/tmp/ROMs/gba"
@Mearman
Mearman / radio_script_blueprint.yaml
Last active December 18, 2022 17:23
Home Assistant Media Player Script Blueprint
blueprint:
name: Radio Player
description: >-
A script that sends an actionable notification with a confirmation before
running the specified action.
domain: script
source_url: https://gist.githubusercontent.com/Mearman/48f0afd0e5dbb1a39fcfafb3ecdb0b3c/raw/radio_script_blueprint.yaml
input:
output_targets:
default: []
@Mearman
Mearman / Steam Redeem.md
Last active February 15, 2023 09:51
Steam Redeem Bookmarklet

Steam Key Redemption Bookmarklets

These bookmarklets allow you to redeem Steam keys directly from your browser. They are available in three versions, each using a different method for inputting the key:

  • Prompt: Prompts the user to enter the key manually.
  • Selection: Attempts to automatically fill in the key using the current text selection.
  • Clipboard: Attempts to automatically fill in the key using the contents of the clipboard.

Usage

@Mearman
Mearman / github_clone_all.sh
Last active January 8, 2023 20:17
github_clone_all.sh
#!/bin/bash
# Check if an organization name was provided
if [ -z "$1" ]; then
echo "Error: No organization name provided."
exit 1
fi
# Set the organization name
ORG_NAME="$1"