Skip to content

Instantly share code, notes, and snippets.

View ZachSaucier's full-sized avatar
💻
I have a lot to be humble about.

Zach Saucier ZachSaucier

💻
I have a lot to be humble about.
View GitHub Profile
@ZachSaucier
ZachSaucier / navidrome-user-styles.css
Last active August 25, 2026 23:44
navidrome-user-styles.css
.lyric-btn,
.audio-lists-icon,
.destroy-btn,
.img-rotate,
[href="#/radio"],
header .MuiToolbar-root > button:first-child {
display: none !important;
}
.audio-lists-num {
// Pull up the index view of all of your songs then run this:
(function() {
const artistCount = {};
let totalSongs = 0;
// 1. Helper function to process a specific document
const processDocument = (doc) => {
// Select rows that have a song title and an artist span
const rows = doc.querySelectorAll('tr');
@ZachSaucier
ZachSaucier / userChrome.css
Last active October 2, 2026 17:38
Hide all Firefox tab media controls
/*
How to add:
1. Open `about:config` and set `toolkit.legacyUserProfileCustomizations.stylesheets` to `true`
2. Open `about:profiles`.
3. Find "Root Directory" of active profile. Open it.
4. Find or create "chrome" directory. Open it.
5. Find or create userChrome.css. Open it.
6. Paste the below code.
7. Restart Firefox.
*/
function draw_arrow(context, x, y, angle, magnitude) {
const head_length = 10;
const dx = Math.cos(angle) * magnitude;
const dy = Math.sin(angle) * magnitude;
const end_x = x + dx;
const end_y = y + dy;
context.beginPath();
context.moveTo(x, y);
context.lineTo(end_x, end_y);
context.lineTo(end_x - head_length * Math.cos(angle - Math.PI / 6), end_y - head_length * Math.sin(angle - Math.PI / 6));
@ZachSaucier
ZachSaucier / .zshrc
Last active March 4, 2026 18:39
Create and navigate to a new git branch from any other branch
# Just Read
zipjr () {
rm ../jr.zip
zip -r ../jr.zip . -x ".ebextensions/*" ".git/*" "node_modules/*"
}
# Svelte
dev () {
npm run dev -- --open
}
const hrefs = [...document.querySelectorAll('.albumThumb a[href*="playlist.view?id="]')].map((e) => e.href);
let lastPlaylistId = -1;
hrefs.forEach((e) => {
const id = parseInt(new URL(e)?.searchParams?.get('id'));
if (id > lastPlaylistId) {
lastPlaylistId = id;
}
});
for (let i = 1; i <= lastPlaylistId; i++) {
let index = i;
@ZachSaucier
ZachSaucier / svelte.config.js
Created January 24, 2024 16:54
Multiple sites in one Svelte project in order to share components
// apps/website-1/svelte.config.js
import { createSvelteConfig } from 'config/svelte.js'
import adapter from '@sveltejs/adapter-cloudflare'
export default createSvelteConfig({
adapter: adapter(),
alias: {
$sections: 'src/sections',
},
@ZachSaucier
ZachSaucier / index.html
Created December 4, 2023 23:07
devtools-detect console.info animation setup
<script type="module" defer>
import devtools from '/devtools-detect.js';
const consoleInfoAnimation = () => {
// console.info animation here
};
const handleDevtoolsChange = (e) => {
if (e.detail.isOpen) {
consoleInfoAnimation();
@ZachSaucier
ZachSaucier / doubly-linked-list.ts
Last active May 6, 2023 18:58
A (comprehensive?) implementation of doubly linked lists using TypeScript.
// Note: This doubly linked list implementation is meant to cover most any use
// case of doubly linked lists. You likely don't need all of the functions
// included for your use case.
class DoublyLinkedListNode<T> {
public value: T;
public next?: DoublyLinkedListNode<T>;
public prev?: DoublyLinkedListNode<T>;
constructor(value: T) {
interface YearDropdownPluginConfig {
text: string;
theme: string;
date: Date;
yearStart: number;
yearEnd: number;
}
const yearDropdownPlugin = function ({
text = "",