Skip to content

Instantly share code, notes, and snippets.

@3dyuval
3dyuval / chezmoi-prune.sh
Last active August 28, 2026 08:50
chezmoi-prune.sh
#!/bin/bash
# chezmoi-prune — forget all DA entries (deleted from disk, still in source).
# For a DA file the target is already gone, so `forget` fully removes it locally.
# --exclude=templates keeps `chezmoi status` alive past secret/template errors.
set -euo pipefail
DRY_RUN=0
ASSUME_YES=0
for arg in "$@"; do
@3dyuval
3dyuval / chezmoi-sync-propagate.sh
Last active October 3, 2026 19:40
chezmoi-sync-prapagate
#!/bin/bash
chezmoi status --exclude=templates \
| grep '^DA' \
| awk '{print $2}' \
| while read -r file; do
echo "Removing \"$file\" with sync-propagate"
chezmoi chattr +remove "$HOME/$file"
done
@3dyuval
3dyuval / cronjob
Created July 22, 2025 08:42
update nvim config every day at 10:00AM
SHELL=/bin/zsh
PATH=/usr/local/bin:/usr/bin:/bin
0 10 * * * git -C pull origin master > /dev/null 2>&1
@3dyuval
3dyuval / OkCupid Paywall
Last active September 22, 2023 21:07
Snippets
// ==UserScript==
// @name OK Cupid Paywall
// @author 3dyuval
// @description Displays the content of the blurry images on 'Who likes you' page
// @include *://*.www.okcupid.com/who-likes-you*
// @version 0.1
// @grant none
// @run-at document-idle
// @noframes
// ==/UserScript==