Skip to content

Instantly share code, notes, and snippets.

@muness
muness / 0 tiling on mac README.md
Last active November 27, 2025 17:21
macos tiling window manager cheatsheet

Notes

I've wanted a clean tiling WM setup on my mac for years. This finally works for me:

  • Yabai for tiling
  • Ghostty for a fast terminal
  • Zellij for panes and tabs
  • JankyBorders for a clear focus highlight
  • A Raycast extension for quick layout toggles and restarts
  • skhd-zig for simple hotkeys
@muness
muness / debolat.sh
Last active December 5, 2025 16:08
Bigme Hibreak Pro debloat script
#!/bin/bash
# Bigme Hibreak Pro Debloat Script
# Safe to disable packages
safe_packages=(
"com.xrz.ai"
"com.xrz.dictapp"
"com.b300.xrz.web"
"com.xrz.soundrecord"
@muness
muness / authorize egpu
Last active August 19, 2025 14:49
Install glances including GPU and web server plugins
#!/usr/bin/env bash
#
# tb3_auto_auth.sh
# Enumerate all Thunderbolt devices via boltctl, enroll them if needed,
# and authorize any that are currently connected.
set -e
# Make sure boltctl is installed
if ! command -v boltctl &>/dev/null; then
@muness
muness / README.md
Last active February 26, 2025 14:42
Fetch enhanced lyrics for FLAC, M4A and MP3 files

Lyric Fetcher for Music Libraries

This script pulls lyrics for FLAC, MP3, and M4A files in a given music folder. It is not Beets-specific but works well with a Beets-managed library. The script supports incremental processing by marking folders as processed using a .lyrical file.

Installation

  1. You'll need Python 3 and pip installed.
  2. Then install the required dependencies:
pip install tqdm tenacity langdetect mutagen syncedlyrics
@muness
muness / am-obsidian.user.js
Last active October 12, 2022 13:37
Add Obsidian Links next to Amazing Marvin tasks
// ==UserScript==
// @name Add Obsidian Links in Amazing Marvin
// @namespace https:/217castle.com
// @updateURL https://gist.githubusercontent.com/muness/3741bfa2afa5e58d38a420c50cefaa38/raw/am-obsidian.user.js
// @downloadURL https://gist.githubusercontent.com/muness/3741bfa2afa5e58d38a420c50cefaa38/raw/am-obsidian.user.js
// @version 0.1.3
// @author Muness Castle
// @description In Amazing Marvin, this script finds Wiki links and adds links to Obsidian
// @require https://cdn.jsdelivr.net/gh/CoeJoder/[email protected]/waitForKeyElements.js
// @match https://app.amazingmarvin.com/*
@muness
muness / BambooHR.gs
Last active February 17, 2021 16:17
BambooHR API client for Google Sheets
// global vars that are taken from userProperties
var BAMBOOHR_SUBDOMAIN = '<fill this out>';
// add a custom menu to enter API credentials, so they don't need to be saved on the script
function onOpen() {
// Add API credentials menu to sheet
SpreadsheetApp.getUi()
.createMenu("BambooHR API Credentials")
.addItem("Set Credentials", "setCred")
.addItem("Remove Credentials", "deleteCred")
CREATE LIBRARY sqlparse LANGUAGE plpythonu FROM 's3://zapier-data-packages/sqlparse.zip' CREDENTIALS 'aws_access_key_id=AKIA6P3ALSQUD7YBV6UK ;aws_secret_access_key=6FzdA0ldVGRuuBqovXpYPZsBLfZN9QAQ8eQbxaK5';
DROP FUNCTION sqlparse_test(ANYELEMENT);
CREATE OR REPLACE FUNCTION sqlparse_test(sql_string ANYELEMENT) RETURNS varchar
IMMUTABLE
language plpythonu
AS
$$
import sqlparse
return (sqlparse.parse(sql_string)[0]).value
@muness
muness / openaudible_split_for_garmin.sh
Created August 15, 2020 15:33
Splits OpenAudible decrypted mp3 files to a form suitable for Garmin watch audiobook playback
#!/bin/bash
# Based on: http://crunchbang.org/forums/viewtopic.php?id=38748#p414992
# m4bronto
# Metadata looks like this:
# Chapter #0:0: start 0.000000, end 1290.013333
# first _ _ start _ end
while [ $# -gt 0 ]; do
@muness
muness / redshift_date_dim.sql
Last active October 22, 2024 19:37
Redshift Date Dimension
-- Potentially quirky when it comes to week numbers.
BEGIN TRANSACTION;
DROP TABLE IF EXISTS numbers_small;
CREATE TABLE numbers_small (
number SMALLINT NOT NULL
) DISTSTYLE ALL SORTKEY (number
);
INSERT INTO numbers_small VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
@muness
muness / sqlite2pg.sh
Last active April 3, 2017 17:23 — forked from eclubb/sqlite2pg.sh
Script to import SQLite3 database into PostgreSQL
#!/bin/sh -ex
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
SQLITE_DB_PATH=$1
PG_DB_NAME=$2
PG_USER_NAME=$3