Author: Daniel Darg

  • Disk Partitions, Tables, Labels and File Systems

    Intro I just got a new disk, installed it physically into my Ubuntu Server, and realized that I’ve forgotten everything to do with disk formatting/partitioning, etc. Here I remind myself as to what exactly all of these are concepts are and how to work with them. Identifying Disks When you’ve got a disk installed for…

  • Eslint, Typescript & VSCode

    Intro I found myself doing a project with deep, complex nesting of callback functions and wanted to flag the reuse of argument names, such as: Since this is legit typescript syntax, you need to use a linter, such as ESLint, to indicate the problem in VSCode with the “no-shadow” rule. I found it frustrating trying…

  • Managing Java Versions on a Mac

    Intro I am told that I need to run Java 11 on my machine. When I run java -version, it reads: WTF does that mean?! Is this Java 8 or 1.8? How can I switch between versions? Is there a Java version manager (à la nvm)? Java vs Javac vs JDK vs JRE vs JVM…

  • Typescript Linting & Formatting

    Intro Most stuff comes with eslint nowadays (e.g. ionic, nextjs), but not with prettier, husky and lint-staged. There are so many packages and plugins in this eco-system, and all I really want is to have formatting on git commits. ESLint, Prettier, Husky, Lint-Staged, etc. tl;dr see here: https://niteshseram.in/blog/setting-up-eslint-prettier-and-husky-with-lint-staged-for-your-nextjs-project Add the following to package.json: Finally, set…

  • Developing a Simple Angular Library

    Intro If you want to be able to easily develop, test, and publish an angular library to npm then follow these steps. Here I’ll be showing what I did to get my library ‘ngx-js9’ published to npm. Library Development On your local machine, create a regular angular application with a name of the form “ngx-XXX-library”:…

  • LAMP Stack App on AWS with Docker, RDS and phpMyAdmin

    Intro I was recently tasked with migrating an old LAMP-stack app (PHPv5) running on a Centos6 server to the newer PHPv7 on a Centos8 machine, and ensuring that the code didn’t break in the php upgrade. I figured the best way to do that would be to use Docker to simulate PHP 7 on a…

  • Archiving Apple Photos with M-Disc

    Archiving Apple Photos with M-Disc

    Intro The 1TB SSD hard drive on my MacBook Pro has gotten pretty much filled up. A big source of this problem are videos from my iPhone getting synced to Apple Photos. Having dogs and kids getting up to memorable things, and a quality iPhone at my finger tips, has lead to a steep increase…

  • Understanding React Context

    TL;DR Intro I tried context once and didn’t especially like it. Part of the supposed appeal is that it is built into React and therefore ostensibly easier to set up than redux. However, I found the setup to involve lots of parts, such that it felt negligibly less complex than redux. Anyhow, I’ve decided to…

  • Raspberry Pi Cluster V: Deploying a NextJs App on Ubuntu Server 20.04

    Intro In the last part I opened up my primary node to the Internet. We’re now in a position to make public-facing applications that will eventually connect up with microservices that harness the distributed computing power of the 4 RPi nodes in our cluster. Before we can make such parallel applications, we need to be…

  • Raspberry Pi Cluster Part IV: Opening Up to the Internet

    Intro We want to serve and access the cluster to the Internet from a home connection. To do that, we need to set up our home router with port forwarding, and open up ports for SSH, HTTP and HTTPS. All traffic goes through our primary node (RPi1). If I want to connect to a non-primary…