Skip to content

Instantly share code, notes, and snippets.

@adam137016
adam137016 / gist:857b6e5a03caca8af83814adc70fa09d
Last active April 19, 2026 18:23
Sonic Adventure Generator for Plex — Genre-Aware Playlist Script
#!/usr/bin/env python3
"""
================================================================================
generate_sonic_adventures.py — v2
A genre-aware Sonic Adventure playlist generator for Plex Music libraries
Requires: Plex Media Server with a Music library and Plex Pass
================================================================================
WHAT IT DOES:
Uses Plex's built-in Sonic Adventure engine (the same one Plexamp uses) to
generate a playlist that travels musically from one seed track to another.
@glennmatlin
glennmatlin / claude_code_hooks_for_uv.md
Last active April 8, 2026 20:48
Claude Code hooks for working with `uv`

Claude Code Hooks for working with uv

by Glenn Matlin / glennmatlin on all socials

What This Does

Prevents Claude Code from using pip, python, pytest, etc. directly in projects that use uv for Python environment management. Instead, Claude is guided to use uv run, uv add, etc.

Smart detection:

  • Only activates in directories with pyproject.toml
@maxspero
maxspero / wordle_variants.md
Last active April 16, 2026 06:59
Comprehensive list of Wordle variants

Original

  • Wordle - Guess a five-letter word in six guesses. Each guess must be real words.

Clones

Multiplayer

@JimmyLv
JimmyLv / {{[[roam-css]]}}-enabled-log-pages.css
Last active June 14, 2022 07:55
Show Image Cover behind Page Title for RoamResearch, just like Notion. https://twitter.com/Jimmy_JingLv/status/1469658825167114240?s=20
.roam-body .roam-app .roam-main .roam-article {
padding-top: 0;
}
.roam-article [style="width: 100%;"], .rm-sidebar-outline [style="width: 100%;"], .roam-log-page .rm-title-display {
background-image: url(https://unsplash.it/1600/900?random);
background-size: cover;
height: 30vh;
margin-bottom: 10px;
position: relative;
@Stvad
Stvad / f.json
Last active August 15, 2021 23:20
comment queries on daily pages
[{"create-time":1629041510869,"title":"comment queries on daily pages",":create/user":{":user/uid":"6bJAKBYrpIcPZBpFEpexUwW3x5r1"},"children":[{"string":"isa::[[iroam/notebook]]","create-time":1629041512459,":block/refs":[{":block/uid":"pt_Ivza0F"},{":block/uid":"FxnP85ywT"}],"refs":[{"uid":"pt_Ivza0F"},{"uid":"FxnP85ywT"}],":create/user":{":user/uid":"6bJAKBYrpIcPZBpFEpexUwW3x5r1"},"uid":"hw_U21Vfv","edit-time":1629041523012,":edit/user":{":user/uid":"6bJAKBYrpIcPZBpFEpexUwW3x5r1"}},{"string":"```javascript\nfunction addDays(original, days) {\n let date = new Date(original.valueOf());\n date.setDate(date.getDate() + days);\n return date;\n}\n\nfunction getDatesBetween(startDate, stopDate) {\n var dateArray = new Array();\n var currentDate = startDate;\n while (currentDate <= stopDate) {\n dateArray.push(new Date (currentDate));\n currentDate = addDays(currentDate, 1);\n }\n return dateArray;\n}\n\nfunction getPagesToProcess() {\n const now = new Date()\n const startDat
@usayamadx
usayamadx / ExportKindle.js
Last active April 2, 2026 10:44 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
// init
let xhr = new XMLHttpRequest()
let domain = 'https://read.amazon.com/'
let items = []
let csvData = ""
// function
function getItemsList(paginationToken = null) {
let url = domain + 'kindle-library/search?query=&libraryType=BOOKS' + ( paginationToken ? '&paginationToken=' + paginationToken : '' ) + '&sortType=recency&querySize=50'
xhr.open('GET', url, false)
@houshuang
houshuang / gist:93a320a5b3d447d13613735be2d68bec
Last active June 26, 2021 08:15
Roam JS for putting a page/block on your left sidebar
// MIT Licensed
// Author: jwilson8767
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/
@dbieber
dbieber / roam-blocks.js
Last active October 3, 2021 11:59
JavaScript Functions for Inserting Blocks in Roam. Documentation at https://davidbieber.com/snippets/2021-02-12-javascript-functions-for-inserting-blocks-in-roam/
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function getPage(page) {
// returns the uid of a specific page in your graph.
// _page_: the title of the page.
let results = window.roamAlphaAPI.q(`
[:find ?uid
:in $ ?title
@azlen
azlen / bulletpaths.js
Last active September 11, 2025 03:00
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
@import url("https://rawcdn.githack.com/jchen1/roam-util/d81f004d4bbf7ec51b562b2170752c82d5adb1f0/roam.css");
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Source+Code+Pro&display=swap');
:root {
--header-font: "Playfair Display", serif;
--body-font: "Merriweather", serif;
--monospace-font: "Source Code Pro", monospace;
--header-color: #f0e8db;
--header-text-color: #111;