Skip to content

Instantly share code, notes, and snippets.

@OutOfFox
OutOfFox / Tracks with release IDs
Created June 3, 2023 00:46
MusicBrainz Picard naming scripts
$upper(%_extension%)/
$set(_aartist,$substr($if2(%albumartist%,%artist%),0,1))
$if($in(0123456789,%_aartist%),#,$if($not($in(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,%_aartist%)),#,$upper(%_aartist%)))
/$if2(%albumartist%,%artist%) (%musicbrainz_albumartistid%)/
%album% (%musicbrainz_albumid%)/
$if($gt(%totaldiscs%,1),$if($gt(%totaldiscs%,9),$num(%discnumber%,2),%discnumber%)-,)$num(%tracknumber%,2) - %title%
Line by line:
Extension/
Set variable to first letter of artist.
alias dtail='docker logs -tf --tail='50' '
alias dstop='docker stop `docker ps -aq`'
alias drm='docker rm `docker ps -aq`'
alias dcp='docker-compose -f ~/docker-compose.yml '
alias dcporph='docker-compose -f ~/docker-compose.yml up -d --remove-orphans'
alias dprune='docker image prune'
alias dprunesys='docker system prune --all'
@yokoffing
yokoffing / ghostery_setup.md
Last active June 22, 2023 17:30
Ghostery setup
Updated: 8 March 2023
version: 8.9.9
Ghostery MV2 (Firefox)

Ghostery Setup

This is my personal setup. Your preferences may differ.

Settings

@startergo
startergo / mas-cli.md
Last active October 31, 2025 20:40
Find Application ID's for mas-cli (Mac App Store) download

In systems up to 10.11.6 you can save the "Purchased" page as html file to disk:

  • Quit App Store.app
  • Open Terminal.app in /Applications/Utilities
  • Enter:
defaults write com.apple.appstore ShowDebugMenu -bool true

and hit the Return/⏎ key to show the debug menu in App Store.app.

  • Open App Store.app (check that the Debug menu is available!)
@jasonsnell
jasonsnell / weatherkit-sampleproject.py
Last active January 10, 2025 05:47
WeatherKit API sample
#! /usr/bin/env python3
import time
import jwt
import json
import requests
from datetime import datetime
from collections import defaultdict
import matplotlib.pyplot as plt
@dannberg
dannberg / obsidian-daily-note-template.txt
Last active February 26, 2026 06:54
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
@saagarjha
saagarjha / library_injector.cpp
Last active February 21, 2026 10:45
Load a library into newly spawned processes (using DYLD_INSERT_LIBRARIES and EndpointSecurity)
// To compile: clang++ -arch x86_64 -arch arm64 -std=c++20 library_injector.cpp -lbsm -lEndpointSecurity -o library_injector,
// then codesign with com.apple.developer.endpoint-security.client and run the
// program as root.
#include <EndpointSecurity/EndpointSecurity.h>
#include <algorithm>
#include <array>
#include <bsm/libbsm.h>
#include <cstddef>
#include <cstdint>
@mbierman
mbierman / logspeed.sh
Last active January 25, 2024 14:26
Log speedtest results on Firewalla
#!/bin/bash
# https://gist.github.com/mbierman/6a32df2909202c373a6a39063181dc40
# v 0.4.1
BASEDIR=$(dirname $0)
IFTTTKEY="$(cat $BASEDIR/IFTTT.data | grep IFTTTKEY| cut -f2 -d "=" )"
EVENT="FWspeedtest"
log=/data/logs/logspeed.log
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UnifiedBar</key>
<dict>
<key>DisclosureRequired</key>
<string>ace440ac-b4f6-4b43-aade-02bba1589aef</string>
<key>Enabled</key>
<false/>
@abjugard
abjugard / macrumors-filter.user.js
Last active May 6, 2025 17:34
MacRumors filter
// ==UserScript==
// @name Remove useless articles on MacRumors
// @namespace https://github.com/abjugard/
// @version 1.16
// @description Removes promos on MacRumors
// @author Adrian Bjugård
// @match https://www.macrumors.com/
// @match https://www.macrumors.com/*/
// @icon https://www.google.com/s2/favicons?domain=macrumors.com
// @grant none