Skip to content

Instantly share code, notes, and snippets.

View Mearman's full-sized avatar
🍞

Joseph Mearman Mearman

🍞
View GitHub Profile
#!/bin/bash
#source: https://gist.github.com/dopiaza/6449505#gistcomment-1627214
# Usage: slackpost "<webhook_url>" "<channel>" "<username>" "<message>"
# ------------
webhook_url=$1
if [[ $webhook_url == "" ]]
then
echo "No webhook_url specified"
exit 1
@Mearman
Mearman / cros-install-resilio-sync.sh
Last active August 10, 2024 00:53
ChromeOS install scripts
#!/bin/bash
# source: https://www.linuxbabe.com/ubuntu/install-resilio-sync-ubuntu-16-04-16-10
# add resilio source
echo "deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free" | sudo tee -a /etc/apt/sources.listdeb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free
# download public keys
wget https://linux-packages.resilio.com/resilio-sync/key.asc
# import key
[
{
"id": "d7e78b3.3948b78",
"type": "ui_gauge",
"z": "41d2bcd7.cea6e4",
"name": "",
"group": "529410ff.d32ce",
"order": 1,
"width": 0,
"height": 0,
@Mearman
Mearman / autocopy.sh
Last active May 3, 2021 15:25 — forked from dale3h/autocopy.sh
[unRAID] Auto-Copy for Unassigned Devices Plugin
#!/usr/bin/env bash
################################################################
# Auto-Copy Script for unRAID Unassigned Devices Plugin
# Original script: https://gitlab.com/snippets/1737763
################################################################
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
# Available variables:
#
@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/
@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 / 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 / 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 / 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 / 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();