Skip to content

Instantly share code, notes, and snippets.

View nivaca's full-sized avatar

Nicolas Vaughan nivaca

View GitHub Profile
;;; turbo-c-nv-theme.el --- Emacs theme matching Turbo C 3.0 VSCode theme -*- lexical-binding: t; -*-
;;; Code:
(deftheme turbo-c-nv
"Turbo C 3.0 / Borland style theme faithfully matching the JSON theme.")
(let* (;; Exact palette from the JSON theme
(tc-blue "#0000A8")
(tc-dark-blue "#000080")
@nivaca
nivaca / create-desktop-file.desktop
Created May 12, 2026 22:25
create-desktop-file.desktop
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=application/x-executable;application/x-shellscript;
Actions=createDesktopFile
[Desktop Action createDesktopFile]
Name=Create Desktop File
Icon=application-x-executable
Exec=~/bin/create-desktop-file.sh %f
#!/usr/bin/env bash
# create-desktop-file.sh
#
# Creates a .desktop launcher for an executable.
#
# Usage:
# ./create-desktop-file.sh /path/to/executable
#
# Optional:
@nivaca
nivaca / gist:d07ee952bb530aeeb637d01195eec51c
Created April 30, 2026 18:49
pdf-audit: check and fix PDF corruption
#!/usr/bin/env bash
# pdf-audit.sh — scan a directory for corrupt PDFs, attempt repair,
# and quarantine files that cannot be recovered.
#
# Usage: pdf-audit.sh [OPTIONS] [TARGET]
#
# Options:
# --recursive Scan subdirectories recursively
# --dry-run Report problems without repairing or quarantining
@nivaca
nivaca / Dracula.xml
Last active April 28, 2026 00:26
Dracula Oxygen XML Editor color theme
<?xml version="1.0" encoding="UTF-8"?>
<serialized xml:space="preserve">
<serializableOrderedMap>
<entry>
<String>annotation.highlight.color</String>
<String>68,71,90</String>
</entry>
<entry>
<String>author.background-color</String>
<String>40,42,54</String>
@nivaca
nivaca / chezmoi.toml
Created May 3, 2024 21:09
chezmoi config
[git]
autoCommit = true
autoPush = true
[diff]
command = "emacsdiff"
[merge]
command = "emacsdiff3"
@nivaca
nivaca / emacsdiff3.sh
Created May 3, 2024 21:08
emacsdiff3.sh
#!/usr/bin/env bash
if [ "$#" -lt 3 ]
then
echo "Needs three filenames as input."
exit 1
fi
EMACS="/usr/bin/emacsclient"
@nivaca
nivaca / emacsdiff.sh
Created May 3, 2024 21:08
emacsdiff.sh
#!/usr/bin/env bash
if [ "$#" -lt 2 ]
then
echo "Needs two filenames as input."
exit 1
fi
EMACS="/usr/bin/emacsclient"
#!/usr/bin/env bash
set -x # echo on
sudo dnf remove -y aajohan-comfortaa-fonts
sudo dnf remove -y google-droid-sans-fonts
sudo dnf remove -y jomolhari-fonts
sudo dnf remove -y khmer-os-system-fonts
sudo dnf remove -y lohit-assamese-fonts
sudo dnf remove -y lohit-bengali-fonts
sudo dnf remove -y lohit-devanagari-fonts
#!/usr/bin/env bash
set -x # echo on
sudo dnf remove -y abrt
sudo dnf remove -y akregator
sudo dnf remove -y artikulate
sudo dnf remove -y blinken
sudo dnf remove -y bomber
sudo dnf remove -y cantata
sudo dnf remove -y cantor
sudo dnf remove -y clementine