1.8 KiB
1.8 KiB
title, date, draft, references
| title | date | draft | references | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Encrypt and Dither Photos in Hugo | 2024-02-05T09:47:45-05:00 | false |
|
A more ambitions version of me would take a crack at adding this functionality to Hugo and opening a PR.
openssl rand -hex -out secret.key 32
openssl \
aes-256-cbc \
-in secretfile.txt \
-out secretfile.txt.enc \
-pass file:secret.key \
-iter 1000000
Dir.glob("content/**/*.{jpg,jpeg,png}").each do |path|
`openssl aes-256-cbc -in #{path} -out #{path}.enc -pass file:secret.key -iter 1000000`
end
Deleting images out of Git history
- https://stackoverflow.com/a/64563565
- https://github.com/newren/git-filter-repo
- https://formulae.brew.sh/formula/git-filter-repo
Dir.glob("content/**/*.{jpg,jpeg,png}") do |path|
`git filter-repo --invert-paths --force --path #{path}`
end
I'm 41 years old, and this stuff still gives me a buzz like it did when I was 14.