All posts [38]

Deploying a React project to GitHub Pages can be quite straightforward once you know the steps. In this post, I'll guide you through setting up a branch for deployment using Git worktrees. This method is efficient, clean, and helps keep your Git repository well-organized. Special thanks to [Sangsoo Nam](https://sangsoonam.github.io/2019/02/08/using-git-worktree-to-deploy-github-pages.h...
When transferring VM images between machines with different sector sizes (for example, one machine uses 512-byte sectors and another uses 4096-byte sectors), you may need to edit the partition table of the target device using a tool like . This ensures that the start and end positions align with the actual physical positions on the disk. Additionally, you may need to create a BIOS boot pa...
Create a new Vite project pnpm create vite@latest --template [react-swc|react|svelte] myapp cd myapp 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 import './index.css' Rename `....
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 mkdir my-svelte-component pnpm init pnpm install -D rollup rollup-plugin-node-resolve rollup-plugin-svelte...
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 linearization, encryption, and numerous other features. It can also b...
Some tips on how to get back some more density with your menus and booksmarks. Edit and set to Create directory and file ```css / Bookmark and context menu spacing / menupopup > menuitem, menupopup > menu { padding-block: 0px !importan...
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...
Install and create partition Install on a Debian based system apt-get install cryptsetup Install on a Red Hat based system yum install cryptsetup Creating a new LUKS partition cryptsetup -y -v luksFormat /dev/$DEVICE Key management Generate 4096-bit random key file head -c 512 /dev/random > KEYFILE Add a key file to next free key slot. This will prompt for a pass...
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 the distribution with "recomm...

GPG Cheat Sheet

2020-07-25
GPG Cheat Sheet
For GPG versions 2.x only. List keys List public keys gpg --list-keys List all secret keys gpg --list-secret-keys List public or secret keys, but show subkey fingerprints as well gpg --list-keys --with-subkey-fingerprints gpg --list-secret-keys --with-subkey-fingerprints The key ring location is normally shown on the first line on stdout. Use different key ring Lis...
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 certbot to re...
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 w...
I've been comparing some load speeds from a variety of different web hosting companies. I started out by trying out the free tier of Netlify to compare how the performance is compared with my usual Vultr VPS service. After seeing that the Netlify load times was almost 10x longer than from the VPS from Australia, I decided to investigate further with some testing. I do like the CI and automatic d...
In this example, we'll show how to convert multiple PNG images to a multi page searchable PDF file. We'll use the following command line tools: - ImageMagick for converting PNGs into multi page TIFF and PDF files. - Tesseract OCR, an open source OCR engine. - [PDFtk Free](https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit...
Here's how to get started with a simple hello world React Javascript app using Parcel. We're going to be using a global install of Parcel here. Install Parcel Install parcel globally npm i -g parcel-bundler The advantage if you install it globally is that is only 4MB and 100 or so files. on the other hand will download about...
Don’t use Alibaba’s CDN! By default, when using the Ant Design ReactJS UI framework, icon fonts are loaded from China’s Alibaba Cloud CDN. This may be undesirable behaviour. You might prefer to have a web site that does not call home when you load a page, or leak IP addresses to a third party. You probably just want all your asse...
Installation Install Debian with . Use MBR and create a single root partition filling the entire disk. Choose minimal with no graphical desktop environment. Only choose standard system utilities. Create the default root user and a separate user with username . Install the following packages as root: apt-get install -y...
Note This works with encrypted VDI disks. The virtual machine must be shut down before proceeding. Backup first! Backup all the and files. Ths is very important! If you're using encryption, these keys are inside the vbox file so make sure you back this up somewhere safe. From now on we don't touch the backups (unless something goes wrong), we're referring to the actual wo...
Backing up VirtualBox virtual machine Just make a copy of the and files. Reducing disk space of dynamic disks This doesn't work for encrypted disks. On client virtual machine: - For Windows - Defragment disk, e.g - Zero free space, e.g (sdelete is part of SysInternals) - For...
Introduction This is one (of many) methods to speed up creating free SSL certificates with Let's Encrypt. It configures the NGINX web server to serve for each domain. This path is used by the webroot plugin. We’ll need to make a directory to servie the challenge files from, we’ll call this `/home/www/letsenc...
This method is not suitable for transmitting sensitive data. For such purposes, consider using a public key encryption scheme like PGP or GnuPG. The following procedure is appropriate for generating passwords for online logins and similar applications. Word List Acquisition Begin by preparing a text file with dictionary words. We will download word lists from [Scowl](http://wordlist.aspell.n...
For RedHat based OS e.g RHEL or CentOS Install yum -y install yum-utils Check current running kernel version rpm -q kernel Remove old kernels, but leave the 2 latest ones. package-cleanup --oldkernels --count=2 Edit and set: installonly_limit=2 This will delete old kernels automatically but leave the latest two next time you perform a `yum...
This guide provides a detailed procedure for importing Gerber RS-274X files into AutoCAD using open-source tools. This approach offers a cost-effective alternative to proprietary software solutions. Before proceeding, ensure the following software is installed and configured: - gerbv: A tool for viewing Gerber files and exporting them to various formats (exclud...
My graphic LCD library (glcd on GitHub) now supports PIC24H with the ST7565R, ST7565P and PCD8544 LCD controllers. The code has been tested with the Newhaven display NHD-C12864A1Z-FSW-FBW-HTT and NHD-C12832A1Z-FSW-FBW-3V3. I...
This guide provides a method to ascertain the shutter actuation count for the following Canon camera models: - Canon 1D Mark II - Canon 50D - Canon 5D Mark II - Canon 5D Mark III - Canon 7D - Canon T2i Additional compatible models may exist. Please share if you have verified this method with other models. Mac OS X gPhoto2 can be installed via [MacPorts](https://ww...
This article provides a comprehensive guide, or more aptly, a set of personal notes, on how to migrate a WordPress blog from one domain name to another. This process is also applicable when transitioning from one web host to another. Initially, you need to gather some details about your old database: - Database host name (e.g., or ) - Database name - Username -...
After having utilized the Turnigy Accucel-6 hobby charger for a considerable period, I developed an interest in leveraging its data logging capabilities. Specifically, my objective was to plot discharge curves for certain batteries. A cursory search on Google yielded several articles, albeit with a significant amount of conflicting information regarding...
A few years ago, I purchased one of these 16×2 LCD and Keypad Arduino shields. There are quite a few of them around (including some clones?), but they are similar to this one from DF Robot: I think I bought this one from eBay a few years ago, but nonetheless, the...
In the context of a project involving the utilization of an ATmega2560 with a custom bootloader (predicated on the Arduino Mega bootloader using the stk500v2 protocol), it was found that the optimal baud rate for programming was 38400, given the use of an 8MHz crystal. The default configuration of avrdude, when employing the programmer switch, doe...
I was working on a web site that used TimThumb, and ran into an issue. TimThumb uses the PHP GD library, which does not support color profiles. It is a very common library used in WordPress themes. This can be an issue with web sites which are for photographers, as sometimes, it may be desired to have embedded color profiles in thumbnails. But when timthumb...
August 2019 update: > - All demo code is available on Github project page Version 0.4 of GLCD Graphic LCD Library has been released. It includes added support for: - ST7565R LCD controller with SPI serial interface with AVR8 implementation. This is used in Newhaven Display model [NHD-C12864WC-FSW-...
Update: I've been developing a handy Qt-based tool named glcd-utils. This tool simplifies the process of creating fonts and bitmaps for GLCDs. Although it's open-source, binaries and extensive documentation are currently unavailable. Feel free to check out the GitHub page. Now, let's dive into the tutorial below. Welcome to a quick guide on craft...
It has been some time since I last delved into a technical article, but today we're delving into the world of flash durations. Despite extensive searching, I couldn't find any comprehensive resources offering real-world measurements of flash durations for speedlights, especially t.1 measurements. Lights Tested In this ende...
Nighttime photography often demands extended exposure times, frequently spanning several minutes. To attain optimal image quality, it's crucial to maintain a low ISO setting to minimize noise, hot pixels, and potential banding artifacts. Many photographers may resort to guessing their exposure times during nighttime shoots, leading to wasted time on "dud exposures" due to incorrect guesses. Her...
Since the release of Photoshop CS2, the introduction of Smart Objects has been a significant development. This article will discuss how photographers who shoot in RAW can leverage smart objects in Photoshop. A highly anticipated feature is soft proofing in Lightroom. Despite Lightroom's efficient workflow tools, it lacks support for one of the most fundamental tools of modern digital editing -...
Welcome to Part 2 of the Smart Objects for Photographers tutorial. This comprehensive tutorial will guide you through the meticulous process of utilizing smart objects, focusing on selective white balancing. The original image, straight out of the camera, portrays Bronte Baths in Sydney, NSW, Australia. ![Original Imag...
Today, we will discuss the art of enhancing colors in a photograph, specifically focusing on increasing saturation or vibrancy while preserving the existing color palette. This is a topic where different photographers may employ various techniques, resulting in diverse approaches. Personally, I rely on two preferred methods for enhancing colors in an existing photo, both of which are accomplished...
Today we will be talking about multiple exposure blending. We will be blending multiple exposure to capture more dynamic range in a scene. This technique is more suited towards landscapes, such as those with sky and water/land structures in them where the scene is bright on one section (e.g up high in the sky) then gradually darker to the other (e.g bottom end of image). Dynamic range [Dynam...