Latest Articles
Converting React or Svelte project from Parcel to Vite
Create a new Vite project Copy over Delete files from of the new project except for and . If the main app is not , rename the import in to the correct file. Delete following line from Rename with JSX to If original files are , rename to if they contain JSX. Copy and update static files Copy… Read more
Create a Svelte component module
Using pnpm, Svelte, rollup.js, create a Svelte component module, test it, and publish to npm. This is a quick cheat sheet for developers without the distractions. Modify as needed. Create component Create Create Edit Create Add other useful files as desired Testing Test locally in new Svelte… Read more
Encrypting PDF files with free command line tools
PDF files can be encrypted using command line tools QPDF and PDFtk. These are available for Windows and Linux. Using QPDF Description from QPDF: This is the QPDF package. QPDF is a command-line tool and C++ library that performs content-preserving transformations on PDF files. It supports… Read more
Reduce bookmark menu spacing in Firefox 91
Some tips on how to get back some more density with your menus and booksmarks. Edit and set to Create directory and file Some of the usual older methods of changing this no longer works since Firefox 91, including Setting to , then changing Density in Menu, More Tools, Customize Toolbar. Source Read more
NGINX conditional logging and responses
Here are some examples on how to configure NGINX to conditionally log requests based on certain conditions like remote IP address, URI etc by using the map module and variables. Conditional logging Create a variable using ngx_http_map_module. This is placed in the HTTP block. Regexes can also be… Read more
LUKS Encryption Cheat Sheet
Install and create partition Install on a Debian based system Install on a Red Hat based system Creating a new LUKS partition Key management Generate 4096-bit random key file Add a key file to next free key slot. This will prompt for a passphrase. You can have up to 8 slots. Add a key file to… Read more
Raspberry Pi Kiosk HOW-TO
Tested with Raspberry Pi 3 and 4, but should work on some older models too. For Ethernet connected kiosk machines. Download and install Raspberry Pi OS Download img file and image to micro SD card. Raspberry Pi OS (32-bit) with desktop, Image with desktop based on Debian Buster. Warning: This is not… Read more
GPG Cheat Sheet
For GPG versions 2.x only. List keys List public keys List all secret keys List public or secret keys, but show subkey fingerprints as well The key ring location is normally shown on the first line on stdout. Use different key ring List keys but use a different home directory for one command only… Read more
Using Let's Encrypt with internal web servers (without DNS challenge)
TL;DR Use internet facing domain on an internal network, I normally use subdomains for this. Domain must have a DNS A record pointing to a public facing web server so Let's Encrypt can find it for the HTTP-01 challenge. This can be served as an empty site or just as a 404 response. Remote VPS uses… Read more
Protecting web sites with NGINX subrequest authentication
TL;DR Protecting a web site with NGINX by using authentication server via a subrequest. Use in NGINX conf. When user requests protected area, NGINX makes an internal request to . If 201 is returned, protected contents are served. Anything else, NGINX responds with 401. is reverse proxied to… Read more