Skip to content

Instantly share code, notes, and snippets.

View Mearman's full-sized avatar
🍞

Joseph Mearman Mearman

🍞
View GitHub Profile
@Mearman
Mearman / .latexmkrc.one.pl
Last active July 22, 2023 20:09
.latexmkrc
$recorder = 1;
$pdf_mode = 1;
$bibtex_use = 2;
$pdflatex = "pdflatex --shell-escape %O %S";
$pdf_previewer = "start open -a preview %O %S";
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
sub run_makeglossaries {
@Mearman
Mearman / coreml_ml.pull.sh
Created June 9, 2023 09:12
Core ML Model Puller
# print working dir
# cd $(dirname "${BASH_SOURCE[0]}")
pwd
# Hololens update blocker file
0.0.0.0 microsoft.com
0.0.0.0 www.microsoft.com
@Mearman
Mearman / git-wip.sh
Last active January 9, 2023 16:00
Git WIP
alias git-wip='function _git-wip() {
branchName="WIP/$(date -Idate | cut -c1-4)/$(date -Idate | cut -c6-7)/$(date -Idate | cut -c9-10)"
# git checkout -b "$branchName" || git checkout "$branchName"
# Check if the branch already exists
if git rev-parse --verify "$branchName" >/dev/null 2>&1; then
# Check out the existing branch
git checkout "$branchName"
else
# Create a new branch and check it out
git checkout -b "$branchName"
@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"
@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 / 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 / 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 / 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 / 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