GeekCoding101 make your way to geek

Coding Notes: Cheat Sheets, Fixes and Dev-Environment Setups

14 posts on coding-notes, newest first.

14posts
2018first post

These are short, hands-on coding notes from GeekCoding101: cheat sheets for Git, Docker and tmux, and fixes for specific bugs in Go, Vue and Angular. Every post comes from real day-to-day work and gives you steps or snippets you can run on your own machine.

Use the sections below to jump to a topic. The full list, newest first, follows.

Cheat sheets: Git, Docker and tmux

Quick-reference notes I come back to myself.

NoteWhat’s inside
Git NotesConfig, branches, fast-forward merge, clone, checkout, remotes, log, diff, stash, squash, and how to revert or reset commits
Docker NotesBuilding images with a multi-stage Dockerfile or docker commit, export and import, and running a private Docker registry
Tmux NotesShortcuts for panes, windows and sessions, plus configuration, plugins, iTerm2 integration and my own .tmux.conf tweaks

Terminal and dev-environment setup

Language and framework fixes

  • Golang Range Loop Reference: Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It). A bug I hit while learning Go: taking the address of the range variable when iterating over a slice of structs, and how to fix it.
  • Vue: Fix the Blank index.html in WebHistory. Why a built Vue app shows a blank page when opened from disk. Covers createWebHistory vs createWebHashHistory, absolute asset paths, and the fix.
  • A Tutorial of Angular, Karma and Jasmine. Testing Angular apps end to end: project setup, in-memory web API, services, specs, a cheatsheet and common Q&A.

Encoding

Linux packaging

Python scripts, written with AI help

FAQ

What counts as a “coding note” on GeekCoding101? It is a short, practical post written while solving a real problem. Most are cheat sheets (Git, Docker, tmux), one-bug fixes (Go range loops, a blank Vue build) or setup guides for a dev environment.

What’s the difference between Base64 and Base32? Base64 encodes data with 64 characters (A–Z, a–z, 0–9, + and /) and adds about 33% to the size. Base32 uses only 32 characters (A–Z and 2–7), so it is case-insensitive and easier to read aloud or type, but it adds about 60%. Base64URL is Base64 with - and _ in place of + and /, so the result is safe in URLs. The encoding guide above covers all three.

Why does my Go range loop keep giving me the same pointer? In older Go versions, the range loop reused one variable for every iteration. Taking &v therefore pointed at the same memory each time, and every pointer ended up holding the last element. Go 1.22 made loop variables per-iteration. On older versions, index into the slice (&items[i]) or copy the value inside the loop. The Golang post walks through the bug and the fix.

Are these notes free? Yes. Every post on GeekCoding101 is free to read, with no sign-up.