The Grimoire
Inspired by the grimoire of Fred Bednarski, this is my place to put assorted snippets of code (which may or may not be cursed, so use at your own risk).
Last updated: November 10th, 2022
Dithering images for this website
convert <img> -colorspace gray -ordered-dither o8x8 o.png
Download mp3 audio from youtube video
youtube-dl --add-metadata -i -x -f mp3/bestaudio <url>
Center element in parent div
.flex-center { align-items: center; justify-content: center; flex-direction: column; }
Use a node module locally
yarn link
— in the module directory
yarn link module_name
— in project that will use the module
Encrypt and Decrypt files using imagemagick
echo foo | convert d.png -cipher - e.jpg
echo foo | convert e.png -decipher - x.jpg
userChrome.css for Firefox, to be hide chrome boilerplate
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/
there.is.only.xul);
#navigator-toolbox {
height: 0px !important;
min-height: 0px !important;
overflow: hidden !important;
}
#navigator-toolbox:focus,
#navigator-toolbox:focus-within,
#navigator-toolbox:active {
height: auto !important;
}