Skip to content

Instantly share code, notes, and snippets.

View Potherca's full-sized avatar
🤔
I wonder what does this button do?

Ben Peachey Potherca

🤔
I wonder what does this button do?
View GitHub Profile
@Potherca
Potherca / spotify-setup.sh
Last active July 21, 2026 18:11
BASH script to create a Spotify single-purpose device on a Debian machine https://gist.pother.ca/spotify-setup.sh
#!/usr/bin/env bash
#
# spotify-setup.sh
#
# Turns a freshly installed, desktop-less Debian machine into a
# dedicated "Spotify appliance": power on -> auto-login -> X starts ->
# Openbox starts -> Spotify appears full-screen. No taskbar, no file
# manager, no desktop environment.
#
# ---------------------------------------------------------------------
@Potherca
Potherca / README.md
Created December 24, 2025 16:20
🔨 Bash Shorts 🩳: How to redirect output to a protected file (a.k.a.“sudo echo”)

🔨 Bash Shorts 🩳: “sudo echo” (or “How to redirect output to a protected file”)

Why sudo echo "something" > /path/to/protected/file.txt doesn’t work and what to do instead.

If you are working on the command-line and you want to write output to a file, sooner or later you come up with this command: echo "output" > file.

This is called a “Redirection”. This works wonderfully and you go on your merry way.

Sometime later, you need to do the same thing with a protected file.

@Potherca
Potherca / .remarkrc
Last active June 7, 2025 11:06
My personal preferences for markdown linting with ReMark
{
"plugins": [
"remark-preset-lint-recommended",
["hard-break-spaces", {"allowSpaces": false}],
"remark-lint-first-heading-level",
"remark-lint-heading-increment",
["remark-lint-heading-style", {"style": "atx"}],
["remark-lint-linebreak-style", {"style": "unix"}],
["remark-lint-link-title-style", {"style": "\""}],
""
@Potherca
Potherca / index.html
Last active October 4, 2025 18:49
Het kabinet Schoofs deed er 223 dagen over om zich te formeren, om vervolgens 337 dagen te regeren, waarna het 149 dagen demissionair was.
<!doctype html>
<meta name="description" content="Het kabinet Schoofs deed er 223 dagen over om zich te formeren, om vervolgens 337 dagen te regeren, waarna het 149 dagen demissionair was.">
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://gist.pother.ca/a1c14a6758e3bf36768c90f43f4fb13b/">
<meta property="og:type" content="website">
<meta property="og:title" content="Kabinet Schoofs I - Formeren vs. Regeren">
<meta property="og:description" content="Het kabinet Schoofs deed er 223 dagen over om zich te formeren, om vervolgens 337 dagen te regeren, waarna het 149 dagen demissionair was.">
<meta property="og:image" content="https://i.imgur.com/XiT6dE5.png">
@Potherca
Potherca / CursorTools.json
Created April 8, 2025 20:17 — forked from ScriptedAlchemy/CursorTools.json
Reverse Engineering cursor prompts
{
"tools": [
{
"type": "function",
"function": {
"name": "codebase_search",
"description": "Find snippets of code from the codebase most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in particular directories, please specify them in the target_directories field.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.",
"parameters": {
"type": "object",
"properties": {
@Potherca
Potherca / RTJ1_cover.webp
Last active August 26, 2024 19:22
Run the Jewels cover randomizer - RTJ(rand)
RTJ1_cover.webp
@Potherca
Potherca / README.md
Last active November 14, 2023 13:58
Scrum commitment

Each artifact contains a commitment to ensure
it provides information that enhances transparency
and focus against which progress can be measured:

  • For the Product Backlog it is the Product Goal.
  • For the Sprint Backlog it is the Sprint Goal.
  • For the Increment it is the Definition of Done.
@Potherca
Potherca / README.md
Last active November 14, 2023 13:51
"Incremental" vs. "Iterative"
@Potherca
Potherca / example.js
Created October 13, 2023 14:11
set search params on an URL in javascript
const url = new URL(document.location)
const search = new URLSearchParams()
const options = {
"foo": "hello",
"bar":"world"
}
Object.entries(options).forEach(([key, value]) => {
@Potherca
Potherca / jwk_with_phpseclib_test.php
Created July 17, 2023 10:28 — forked from sicet7/jwk_with_phpseclib_test.php
Use JWK from JSON with the lcobucci/jwt library through phpseclib. Credit to @whatTool for helping with the implementation
<?php
//REQUIREMENTS!
//"phpseclib/phpseclib": "^3.0"
//"lcobucci/jwt": "^5.0"
require_once __DIR__ . '/vendor/autoload.php';
$json = '{
"keys": [
{