Skip to content

Instantly share code, notes, and snippets.

View ReticulatedSpline's full-sized avatar

Benjamin Carpenter ReticulatedSpline

View GitHub Profile
@ReticulatedSpline
ReticulatedSpline / init.vim
Last active September 30, 2025 19:33
vim config
:let mapleader = ","
"Ctrl+Shift+up move line above
nmap <C-S-Up> :m -2<CR>
"Ctrl+Shift+down move line below
nmap <C-S-Down> :m +1<CR>
"Commas for faster writes and exits
nnoremap <leader>q :q!<cr>
@ReticulatedSpline
ReticulatedSpline / config.yaml
Created June 23, 2023 04:36
beets config file
directory: ~/music/tracks
library: ~/music/beets/library.db
ui:
color: yes
plugins:
- edit
- fetchart
- embedart
@ReticulatedSpline
ReticulatedSpline / system_stats.glet
Created May 9, 2023 15:40
macOS GeekTool System Stats
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Command</key>
<string>####### Free Memory
a=$(vm_stat | awk '/Pages free/ {print $3}' | awk 'BEGIN { FS = "\." }; {print ($1*0.004092)}' | sed 's/\..*$//');
#for page size of 4092 bytes displayed in mb free
####### CPU Utilization
@ReticulatedSpline
ReticulatedSpline / binds.cfg
Last active December 31, 2022 22:33
TF2 Config
# C:\Program Files (x86)\Steam\steamapps\common\Team Fortress 2\tf\cfg\binds.cfg
# launch option: +exec binds
alias chat_on "voice_enable 1;hud_saytext_time 12;play HL1/fvox/voice_on.wav;echo Chat enabled"
alias chat_off "voice_enable 0;hud_saytext_time 0;play HL1/fvox/voice_off.wav;echo Chat disabled"
bind PGUP chat_on
bind PGDN chat_off
bind "F1" "load_itempreset 0"
@ReticulatedSpline
ReticulatedSpline / clear_tile_cache.bat
Created October 26, 2020 02:24
Windows batch script for clearing desktop icon caches
@echo off
echo Killing explorer...
taskkill /f /im explorer.exe
taskkill /f /im shellexperiencehost.exe
timeout /t 3 /NOBREAK > nul
echo Deleting TempState...
del %localappdata%\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy\TempState\* /q
timeout /t 2 /NOBREAK > nul
del Deleting IconCache
del %userprofile%\AppData\Localdelete IconCache.db
@ReticulatedSpline
ReticulatedSpline / runge_kutta.cpp
Created February 11, 2020 01:38
differential equation solver
#include <iostream>
#include <iomanip>
#include <limits>
using namespace std;
/* sloppy code for extra credit
ben carpenter / carpe504 */
//number of steps
int n = 0;
@echo off
title synchronize rockbox device
set /P targetDrive="Enter target drive destination: "
echo Files on destination drive %targetDrive%: may be destroyed!
pause
:: Clear log files
break>audio_sync.log
rem -------------------------------MUSIC------------------------------------------/
@ReticulatedSpline
ReticulatedSpline / dynamic_strings.c
Created September 5, 2019 14:19
Allocate and work with a dynamic array of strings and a single allocation.
/**
* Proof that a dynamic array of strings CAN be created
* with a single malloc/calloc. Unfortunately, also proof
* that it probably shouldn't be...
*/
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@ReticulatedSpline
ReticulatedSpline / precedence_chart.html
Created September 3, 2019 19:17
Snazzy printable table of C operator precedence
<!DOCTYPE html>
<!--
Chart pulled from https://en.cppreference.com/w/c/language/operator_precedence
Stylesheet pulled from https://www.w3schools.com/css/css_table.asp
-->
<head>
<title>C Precedence Chart</title>
<style>
table {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
@ReticulatedSpline
ReticulatedSpline / spanish_accents.ahk
Last active October 20, 2020 05:27
spanish deadkeys
; Deadkey script for accented Spanish letters
; "Moves" the grave mark, tilde, or double apostrophe over the next key (a` → á)
; Repeated punctuation is inverted (!! → ¡)
#Hotstring c r * ?
::A``::Á
::a``::á
::E``::É
::e``::é