Skip to content

Instantly share code, notes, and snippets.

View joshuamabina's full-sized avatar
🎯
Focusing

Joshua Mabina joshuamabina

🎯
Focusing
View GitHub Profile
@joshuamabina
joshuamabina / building-testable-nodejs-apps.md
Created December 31, 2025 06:35
Building Testable Node.js Apps

Building Testable Node.js Apps

This Gist serves as an initial implementation of a crash course designed for building testable Node.js Apps.

Included in this document:

  • The Hexagonal Premise: Inversion of Control and the sanctity of the Domain.
  • The Domain Model: Distinguishing Entities from Values.
  • Aggregates: Defining consistency boundaries and the Aggregate Root.
  • Domain Services: Handling logic that belongs to no single object.
@joshuamabina
joshuamabina / .gitignore
Last active December 30, 2025 01:26
Universal .gitignore for modern projects
# ====================
# System / OS files
# ====================
.DS_Store
Thumbs.db
*.swp
*.swo
# ====================
# Vim
@joshuamabina
joshuamabina / web-tdd-exercises.md
Last active December 22, 2025 20:50
Web TDD Exercises

TDD exercises

This is a curated set of programming exercises focused on building web applications with JavaScript.

It is designed for developers who are still gaining confidence and want to develop solid habits early.

The work is done using test-driven development, with an emphasis on refactoring and clean, maintainable code throughout.

TODO: Difficulty level and concepts applied.

@joshuamabina
joshuamabina / .editorconfig
Last active December 30, 2025 01:23
Universal EditorConfig for modern projects
# https://editorconfig.org/
# Universal EditorConfig for modern, multi-language projects
# PHP follows PSR-1 / PSR-12 and Laravel conventions
#
# Author: Joshua Mabina
# Email: mabinajoshua@gmail.com
root = true
# --------------------------------------------------
@joshuamabina
joshuamabina / ai-pair-programming-protocol.md
Last active December 31, 2025 15:14
AI Pair Programming Framework - Inspired by Paul Hammond

AI Pair Programming Protocol

This document defines the working agreement for AI-assisted pair programming. The goal is to maximise code quality, preserve architectural integrity, and prevent long-term technical debt while working iteratively with AI.

This protocol is binding for for this sessions.

1. Project Context Acquisition (Mandatory)

AI effectiveness depends on correct global context.

@joshuamabina
joshuamabina / users.json
Created July 21, 2021 01:12
i18n object structure / users.json
{
"users": {
"inputs": {
"title": {
"label": "Title",
"placeholder": "Your title",
"description": "Your title e.g. Mr/Ms/Mrs/Sir/Madam",
"header": "Title"
},
"firstName": {
@joshuamabina
joshuamabina / awesome.md
Last active July 12, 2024 12:32
My curated list of awesome things!

AWESOME

My curated list of awesome things!

Project Management and Code Collaboration

  • Dive into Git & GitHub
    • Simple Guide - Just a simple guide for getting started with Git. No deep shit ;)
    • Git Handbook - 10 minute read about Git & GitHub.
    • How to GitHub - Fork, Branch, Track, Squash and Pull Request
@joshuamabina
joshuamabina / index.js
Last active April 11, 2021 21:09
Interview Question: Given a text, return the most repeated letter.
'use strict';
/**
* @function mostRepeatedLetter
* @returns object the highest repeating letter and count
*
* @description
*
* Given a text: `I want to rock this interview`, return the most repeating letter.
*
@joshuamabina
joshuamabina / clear.txt
Last active June 20, 2020 06:41
Clear/Reset Expo
watchman watch-del-all && rm -rf node_modules/ && npm cache verify && npm install && expo r -c
@joshuamabina
joshuamabina / Dockerfile
Last active June 2, 2020 08:47
My HALO jump into containerizing Node.js apps using Docker - [link here]
# We first specify the image node version we want Docker to grab.
# Docker images live in harmony at Docker Hub (hub.docker.com).
# It still seems to be the easiest way to share images.
FROM node:8
# Below, describes to our soon to be Docker image,
# where to place all the application source code.
WORKDIR /usr/src/app
# We then move on to copying and installing our app's
# dependencies into the Docker image.
# Notice how, using a wild-card, we've managed to subtly