Skip to content

Instantly share code, notes, and snippets.

View Mearman's full-sized avatar

Joseph Mearman Mearman

View GitHub Profile
@Mearman
Mearman / Obsidian Snippets
Last active October 17, 2025 02:48
Obsidian Snippets
A collection of snippets
@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 / 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 / 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 / install_unraid_template.sh
Last active August 14, 2021 07:20
Script for running UnRAID docker templates from CLI
#!/usr/bin/php
<?
$docroot = "/usr/local/emhttp";
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
$var = parse_ini_file('/var/local/emhttp/var.ini');
$cfg = parse_ini_file('/boot/config/docker.cfg');
$driver = DockerUtil::driver();
@Mearman
Mearman / download_hassos.sh
Last active October 10, 2021 07:49
HAss OS Image download and decompress
#!/bin/bash
set -x
# find the latest version here: https://github.com/home-assistant/operating-system/releases
VERSION="6.5"
# ----------
IMAGE_NAME="haos_ova-$VERSION"
IMAGE_FILE="$IMAGE_NAME.qcow2"
COMPRESSED_IMAGE="$IMAGE_FILE.xz"
DESTIONATION="/mnt/user/domains/$IMAGE_NAME"
# ----------
@Mearman
Mearman / cloudflare_whitelist.sh
Last active May 18, 2025 06:00
NGINX Cloudflare Access whitelist
#!/bin/bash
cd /mnt/user/appdata/NginxProxyManager/nginx
echo "IPV4" >> new.conf
echo "" >> new.conf
curl -sSL https://www.cloudflare.com/ips-v4 | awk '{print "allow",$1,";"}' >> new.conf
echo "IPV6" >> new.conf
echo "" >> new.conf
curl -sSL https://www.cloudflare.com/ips-v6 | awk '{print "allow",$1,";"}' >> new.conf
@Mearman
Mearman / functionsDeploy.js
Created June 11, 2021 07:51 — forked from AlissonEnz/functionsDeploy.js
Firebase Batch Deploy Functions
// see: https://gist.github.com/AlissonEnz/e4350042a93b7732d3fe9fb138f81b11
// Firebase Batch Functions Deploy (Alisson Enz)
// This script helps firebase users deploy their functions when they have more than 60 functions and
// it's not allowed to deploy all using `firebase deploy --only functions` due deployment quota.
// This script will get your functions export from index.js and deploy in batches of 30 and wait 30 seconds.
// This script will NOT delete your function when removed from index.js.
// Instructions
// 0. This instructions suppose that you already have firebase-tools installed and is logged to your account;
@Mearman
Mearman / install_obs.sh
Created June 10, 2021 07:22
OBS with Virtual Webcam Linux Installer
#!/bin/bash
sudo apt install ffmpeg
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt install obs-studio
sudo apt install -y v4l2loopback-dkms
@Mearman
Mearman / install_teamspeak_client.sh
Last active June 10, 2021 07:22
Lazy Linux TeamSpeak Client Installer
#!/bin/bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
wget https://addons-content.teamspeak.com/943dd816-7ef2-48d7-82b8-d60c3b9b10b3/images/648_366/teamspeaklogo_5d00347a0cb48.png -O $DIR/teamspeak.png
sudo apt-get install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.teamspeak.TeamSpeak
cp $DIR/teamspeak.png $HOME/.local/share/applications/