Skip to content

Instantly share code, notes, and snippets.

import csv
import argparse
from datetime import datetime
import os
from rich import print
key_website = 'Website'
key_order_date = 'Order Date'
key_total_cost = 'Total Owed'
key_name = 'Product Name'
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
<head>
<title>sethforprivacy-subscriptions.opml</title>
</head>
<body>
<outline text="Bitcoin" title="Bitcoin">
<outline text="@lightcoin" title="@lightcoin" description="" type="rss" version="RSS" htmlUrl="https://lightco.in/" xmlUrl="https://lightco.in/feed/"/>
<outline text="6102bitcoin" title="6102bitcoin" description="" type="rss" version="RSS" htmlUrl="https://6102bitcoin.com" xmlUrl="https://6102bitcoin.com/index.xml"/>
<outline text="Athena Alpha" title="Athena Alpha" description="" type="rss" version="RSS" htmlUrl="https://www.athena-alpha.com/" xmlUrl="https://www.athena-alpha.com/feed/"/>
@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 March 9, 2024 16:19
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
@saagarjha
saagarjha / library_injector.cpp
Last active June 17, 2025 13:55
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/>