Skip to content

Instantly share code, notes, and snippets.

View svandragt's full-sized avatar
💪
+11 −272,086

Sander van Dragt svandragt

💪
+11 −272,086
View GitHub Profile
@svandragt
svandragt / tabtime.html
Created August 25, 2025 09:21
TabTime
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Time</title>
<style>
body {
font-family: sans-serif;
display: flex;
justify-content: center;
<?php
const REST_NAMESPACE = 'test/v1';
add_action( 'rest_api_init', function () {
register_rest_route( REST_NAMESPACE, '/test', [
'methods' => 'GET',
'callback' => 'handle_rest_test',
'permission_callback' => '__return_true',
] );
@svandragt
svandragt / userChrome.css
Created May 22, 2025 14:12
Firefox userChrome optimised for the compact connaisseur
/* Make it easier to find active tab */
.tab-background {
&:is([selected], [multiselected]) {
border-top: 1px solid #444 !important;
}
}
/* Thinner pins, even in compact */
.tab-content {
padding: 0 4px !important;
@svandragt
svandragt / github-viewer.py
Last active May 6, 2025 16:03
Open pull request viewer
#!/usr/bin/env python
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "pyperclip",
# "requests",
# ]
# ///
import os
import json
@svandragt
svandragt / open-links.py
Last active June 2, 2025 15:31
Open text links in browser tabs
@svandragt
svandragt / jira-ticket.py
Created April 23, 2025 12:56
JIRA Ticket Checker Script
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "pyperclip",
# "requests",
# ]
# ///
import os
import requests
import subprocess
@svandragt
svandragt / devbox.json
Last active April 14, 2025 15:41
DevBox bootstrap for Godot compilation
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.1/.schema/devbox.schema.json",
"env": {
"SCRIPT_AES256_ENCRYPTION_KEY": "<your encryption key here>"
},
"packages": [
"uv@latest",
"[email protected]"
],
"shell": {
@svandragt
svandragt / git-cai.sh
Created February 16, 2025 21:08
Git Commit AI logs
#!/usr/bin/env bash
# filename: ~/bin/git-cai
# example: git cai
#
# Copies an AI-generated summary of a commit to the clipboard before opening the commit dialog.
# Requires commitmsg and copy aliases
# uvx llm keys set gemini
# Detect the OS type
if [[ "$OSTYPE" == "darwin"* ]]; then
@svandragt
svandragt / proof-of-concept.py
Last active November 1, 2024 09:20
Script to post a discord message to WordPress when a heart emoji is used
import discord
from discord.ext import commands
import requests
import json
# Create a bot instance with a command prefix
bot = commands.Bot(command_prefix='!')
# WordPress credentials
WORDPRESS_URL = 'https://yourwordpresssite.com/wp-json/wp/v2/posts'
@svandragt
svandragt / composer.json
Created September 11, 2024 14:58
TextPattern composer setup
{
"name": "my/mysite",
"type": "project",
"authors": [
{
"name": "My Name",
"email": "[email protected]"
}
],
"require": {