Skip to content

Instantly share code, notes, and snippets.

View gclves's full-sized avatar

gclves

  • GB
View GitHub Profile
@gclves
gclves / Default.sublime-commands
Created April 30, 2026 19:33
"Quick scratch" buffers in Sublime
[
{
"caption": "Quick Scratch: Toggle Scratch File",
"command": "quick_scratch"
}
]
@gclves
gclves / prompt.zsh
Last active October 29, 2025 16:53
A simple prompt for zsh meant to visually distinguish between command output and prompt
#!/bin/zsh
# Variable to store the last exit status
last_exit_status=0
# Function to print a horizontal line separator with timestamp and last command status
print_separator() {
local cols=${COLUMNS:-$(tput cols)}
local timestamp=$(date '+%H:%M:%S')
local separator_char="─"
@gclves
gclves / bulk_convert.py
Last active December 22, 2024 22:10
Bulk convert iCal to CSV
#!/usr/bin/env python3
import csv
import sys
from zipfile import ZipFile
from ics import Calendar
def usage():
@gclves
gclves / fix_albumart
Last active February 18, 2024 16:40
Fix album art for use with Rockbox
#!/usr/bin/env python
# TODO: add progress bar
# TODO: maybe add interactivity?
from pathlib import Path
from mutagen.flac import FLAC, Picture
from mutagen.id3 import APIC, ID3, PictureType, ID3NoHeaderError
from wand.image import Image
@gclves
gclves / tofu.md
Created June 28, 2022 16:47
ToFu eligibility
flowchart TB
    Begin(Begin)
    Pass
    Fail
    Begin --> B{Refinance?}
    B-->|yes| Pass
    B-->|no| C{< 2 years?}
    C-->|yes| Fail
 C--&gt;|no| D