Weekend project progress: routes for Larri

This morning, I started working on a simple weekend project in which the goal is a deployed API server that does one simple thing. The business logic and the API behavior isn’t too important to me because the focus of this project is actually learning more about deployment.

So far though, I’ve been only concentrating on getting a working version of the app locally.

It’s call “Larri Adda” which comes from a song about a bus stop.

The main goal is to get a DigitalOcean server and database working together properly.

What I’ve learned so far is:

  • Routing in Express is extremely flexible, it’s my first time using express.Router which is pretty powerful.
  • When using route parameters (like /user/:id), use {mergeParams: true} within the route file that expects to use route params in order to actually receive them from the parent file.
  • I’m using bits of code generated by Github Copilot which blows me away with how good it is guess what I’m trying to do!

Next on my list is to get MongoDB working with my app and I don’t want to do that today so maybe I’ll do that tomorrow 🤣

Is the Keychron Q1 a GMMK Pro dupe?

So I finished building my GMMK Pro last week (a writeup is in my drafts for that). I got an email from Keychron the same week I got my GMMK Pro shipped. I waited about 6 months after reserving the board to be able to buy the GMMK Pro so timing was a total coincidence, I think. I’ll have more thoughts on the GMMK Pro in its own post but for now, I wanted to mention the new announcement, Keychron’s Q1 board.

So far, Keychron has had great entry level mechanical boards but one of the features they’ve been lacking is the ability to use QMK for custom firmware/key mapping and the ability to buy the barebones board, without keycaps and switches.

Well, that changes with their latest announcement. Unlike most of their boards that they put through Kickstarter, this one will be available on their website some time around the end of July or early August and will start shipping in September.

The reason I’m writing this post is because the feature set for the GMMK Pro and the Q1 look oddly similar, almost like they looked at the GMMK Pro and said “how can we replicate this and make it just a tad less expensive”.

Below I have a comparison of features:

FeatureGMMK ProKeychron Q1
Layout / number of keys75% TKL – 83 keys (ANSI US)TKL – between 83 – 87 keys
Rotary knobYes, comes with all boardsNot at launch, will be added later
Price$170 barebones aluminum case option
Varies between $200-350 for additional options
$140 for base option
$170 for basic kit (keys and switches)
Case materialAluminum, polycarbonate, or brassAluminum only
ConnectionUSB-CUSB-C
Wireless / bluetoothNoNo
ANSI/ISO optionYes – not at launchYes – at launch
RGBYes – south facing RGB Yes – south facing RGB
StabilizersPreinstalled GOAT stabsUnknown at launch
Third-party stabs?Yes – but durock v2 take some
work fitting into the plate
Yes – support for both Cherry
and Durock V2
Hot swappableYesYes
QMK / VIA supportNot at launch – planned for mid-2021Yes
ColorwaysBlack and silver (known as white)Unknown but marketing page shows Blue, Gray, Gunmetal
Typing Angle6º – no legsUnknown – no legs

Hopefully this is a helpful list of features you can review and decide for yourself if the Q1 is a dupe or will have its own audience.

Local .vimrc for neovim settings and differences

For directory-specific vim settings, you can use .vimrc but when using neovim, you’ll need to use .nvimrc instead.

To get it all working, add the following to your init.nvim file:

set exrc
set secure

Using set secure will disable/disallow using autocmd settings

In the directory with vim settings, add an .nvimrc file.

I was struggling with this b/c I was using .vimrc for neovim which didn’t work for me.

Running a local docker instance for WordPress theme development

I wanted to update the Leaf theme (the one I’m currently using) and I haven’t had wordpress on my computer in a long time.

Instead of going through the whole set up again, I decided to use docker for this.

I wanted to keep the setup to a minimal and also make it portable for future use, below are the steps you’ll need to get it running.

  1. Install Docker (I’m on mac, so I just have the docker app).
  2. Make a directory that you can call something like wordpress-docker, this is where the docker-compose.yml file will live.
  3. Add the following to the docker-compose.yml file:
version: '3.1'

services:

  wordpress:
    image: wordpress
    restart: always
    ports:
      - 8080:80
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: password
      WORDPRESS_DB_NAME: wordpress
    volumes:
      - wordpress:/var/www/html
      - ../leaf:/var/www/html/wp-content/themes/leaf # --- this assumes we have leaf one dir up


  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: password
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes:
      - db:/var/lib/mysql

volumes:
  wordpress:
  db:

4. Start up the docker instances by running docker-compose up (from within wordpress-docker)

5. Go to localhost:8080, you should see the wordpress instance.

6. After the setup is complete, go to localhost:8080/wp-admin/themes.php and you should see the theme for development too.