Latest writing
View all postsThis guide shows how to use Clonezilla to image a disk or partition and save the image onto a LUKS-encrypted ext4 filesystem. It covers creating the LUKS container, formatting it with ext4, manually mounting it to /home/partimag/ (required by Clonezilla for local-disk images), running Clonezilla, and safe teardown. This will give maximum write performance and security for storing disk images. It i...
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 gh-pages branch for deployment using Git worktrees. This method is efficient, clean, and helps keep your Git repository well-organized. Special thanks to Sangsoo Nam for his excellent guide, which inspired this process. Other platforms which use a build...
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 parted. 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 parti...
Create a new Vite project pnpm create vite@latest --template [react-swc|react|svelte] myapp cd myapp Copy over /src/ Delete files from src/* of the new project except for main.jsx and vite-env.d.ts. If the main app is not src/App.jsx, rename the import in src/main.jsx to the correct file. Delete following line from src/main.jsx import './index.css' Rename .js with JSX to .jsx If original files are...
Create a Svelte component module
2022-10-23
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 rollup-plugin-postcss postcss svelte mkdir src Create src/index.js Create src/MyComponent.svelt...
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 be used for splitting and merging files,...