Skip to content

Instantly share code, notes, and snippets.

View leath-dub's full-sized avatar

cathalogue leath-dub

View GitHub Profile
@leath-dub
leath-dub / achromat.lua
Created February 3, 2025 18:09
Monochrome colorscheme (place in "$HOME/.config/nvim/colors" directory and name it what you like .lua (e.g. example.lua) - then load by that name: `:colorscheme example`)
-- Made with 'mini.colors' module of https://github.com/echasnovski/mini.nvim
if vim.g.colors_name ~= nil then vim.cmd('highlight clear') end
vim.g.colors_name = "achromat-darker"
-- Highlight groups
local hi = vim.api.nvim_set_hl
hi(0, "@attribute.builtin", { link = "Special" })
hi(0, "@character.special", { link = "SpecialChar" })
@leath-dub
leath-dub / .sh
Created June 29, 2024 16:34
River config
#!/bin/sh
# This is the example configuration file for river.
#
# If you wish to edit this, you will probably want to copy it to
# $XDG_CONFIG_HOME/river/init or $HOME/.config/river/init first.
#
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
# documentation.
@leath-dub
leath-dub / podman-compose.yml
Created February 3, 2023 21:22
My workflow docker compose yaml for database testing
version: '3.8'
services:
db:
image: docker.io/mysql:latest
cap_add:
- SYS_NICE
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
ports:
@leath-dub
leath-dub / guruarchive.sh
Last active January 18, 2023 14:30
Minimal curl command for fetching past papers for dcu.guruarchive.com
#!/bin/sh
curl -d '{"from":0,"size":20,"sortField":"year","sortOrder":"DESC","search":{"documentType":"exam-paper","moduleCode":null,"school":null,"year":null,"author":null,"semester":null,"query":"ca117","programme":null}}' \
-H "authority: api.gurudevelopments.com" \
-H "method: POST" \
-H "path: /search/archive" \
-H "scheme: https" \
-H "accept: application/json" \
-H "accept-language: en-GB,en-US;q=0.9,en;q=0.8" \
-H "content-length: 204" \
#!/bin/sh
cmd=$( ( IFS=":"
for _path in $PATH
do
echo $_path
done ) \
| xargs -i find -L {} -executable -maxdepth 1 -mindepth 1 -type f -printf '%P\n' \
| sort -u \
| fzy )