Actionable guides for developers and investors.

Learn Linux, Investing, and TypeScript with practical tutorials (no fluff, just receipts).

Explore TopicsLatest Post
prisma

Upgrading to Prisma 7.5.0: A Complete Docker and WASM Troubleshooting Guide

What started as a simple Prisma upgrade became a deep dive into Docker architecture, WebAssembly file handling, and TypeScript path resolution. Here's our complete journey from 7.2.0 to 7.5.0.

  • prisma
  • docker
  • wasm
  • nestjs
  • typescript
  • troubleshooting
  • database
Architecture

Pre-generation Strategy: How We Cut Report Load Times from 3 Minutes to 20ms

How we transformed 3-minute financial report load times into 20ms responses using pre-generation, database caching, and scheduled jobs.

investing

Valuation & Shareholder Yield: A Beginner’s Scorecard

How to read valuation and shareholder yield with a simple point system that leans on sector medians, guards against one-offs, and keeps cash reality in focus.

Nginx

How our site briefly redirected to a malicious page β€” and how we fixed it

Traffic to firgun.win briefly 302'd to a malicious Arweave link because a stray container had claimed port 3000. We rebuilt the app, pruned stale containers, and tightened post-deploy port checks.

investing

Quality & Profitability: A Plain-English Guide to the Core Metrics

A plain-English guide to quality and profitability metrics: what they mean, how they fit together, and how to read them without needing a finance background.

DevOps

Docker Compose Health Checks: A Practical Guide for Junior Devs & Ops

Keeping containers running isn't enough; you need to know they're actually healthy. Learn how to configure, observe, and act on Docker health checks with practical snippets you can lift into your own projects.

testing

Why Block Network Access in Tests

Block real HTTP calls in tests to keep them deterministic, fast, and safe by forcing every outbound request to be mocked.

nextjs

Running the Web App Locally vs. in Docker Compose

A beginner-friendly guide to using different API URLs for local development and Docker Compose, with clear environment file examples.

Linux

How to Launch a New Amazon EC2 Instance with Amazon Linux 2023 and Add Extra Storage

Use the AWS CLI to pick the latest Amazon Linux 2023 AMI, launch an EC2 instance with a 100 GB gp3 root volume, and connect over SSH.

Nginx

Setting up Nginx with Cloudflare SSL on Amazon Linux 2023 (via Certbot)

End-to-end setup: Nginx on Amazon Linux 2023, Cloudflare DNS/proxying, and Let's Encrypt certificates via Certbot for Cloudflare Full (Strict).

investing

How a Dividend Stock Screener Chooses the "Top 10" (In Plain English)

A practical filter-first, then rank system: screen out unhealthy dividend stocks, score the survivors, and keep the 10 best.

Learning

What typings.d.ts Is For in TypeScript Projects

A practical guide to project-level TypeScript declaration files like typings.d.ts, with examples for assets, globals, and third-party libraries.

SwiftUI

DependencyContainer Malloc Crash in Tests – Post-Mortem

Under XCTest teardown we hit a repeatable 'pointer being freed was not allocated' malloc crash when deallocating async/Combine-heavy DependencyContainer and view models. This post explains what was happening and why we fixed it by deliberately leaking those objects in DEBUG tests only.

SwiftUI

SwiftUI @MainActor Initializers: Safe Default Parameters and Actor Isolation

After enabling stricter Swift concurrency checks, we started seeing main-actor isolation errors from @MainActor initializers that used default parameter values. This post explains why default parameter expressions are nonisolated and how to fix the pattern by moving defaults into the initializer body.

SwiftUI

SwiftUI @Published Crash: β€œPointer Being Freed Was Not Allocated” Explained

During test teardown we hit a repeatable 'pointer being freed was not allocated' crash while deallocating a @MainActor ObservableObject, and this post explains why we treated it as a Swift runtime edge case instead of rewriting our architecture.

SwiftUI

SwiftUI Alerts: Fixing Bugs When Multiple Alerts Collide

SwiftUI silently ignored save error alerts once a second alert existed, and this post captures what we learned in the Advanced SwiftUI: Lessons From Mistakes series.

Kubernetes

Kubernetes Cluster Setup on AWS EKS

A step-by-step guide to creating a production-ready Kubernetes cluster

React Native

React Native Learning Path Phase 1 Key Concepts

A list of key concepts that build a strong foundation for Phase 1 of the learning path.

Node.js

Adding a local library to a monorepo

In this article we will be adding a shared local library to a monorepo.

OpenWrt

Windscribe VPN on OpenWRT Linksys MR8300

In this article we will be setting up an OpenVPN client on OpenWrt.

Android

Do not trust all certificates

Trusting all certificates allows anybody to do a man in the middle attack

Swift

Dependency Injection in Swift: Why and How to Inject Dependencies

Why do we need to inject dependencies and some tools that help with it...

Swift

XCTestCase wait Helper: Wait for Conditions Without Manual Expectations

XCTest expectations are great but it is not easy to use them.

Swift

When to Use [weak self] in Swift Closures (and When You Don’t Need It)

It has become pretty common among Swift experts to always use [weak self] inside of a closure to avoid retain cycles ...

Ghost

Ghost: why this blog no longer runs on it

We started using Ghost when it was still in its very early stages ...

Swift

UIScrollView with Auto Layout in Code: Step-by-Step Guide for iOS 12+

It is fairly easy to use UIScrollView with the AutoLayout on iOS 12+ but only if one follows the following steps ...

Swift

Create a Swift Framework That Uses C Code in Xcode

How to create a framework that uses C with Xcode

iOS

Symbolication in iOS Apps: Use dSYM and DWARF to Decode Crash Logs

Symbolification is the process of mapping machine addresses into the source code. The tricky part is that by default .DSYM file is only generated for release builds.

RxSwift

RxSwift: How to Avoid Memory Leaks with DisposeBag and Resource Tracking

RxSwift is a powerful framework and, as always, with power comes responsibility.

iOS

Fix Auto Layout "Unable to Satisfy Constraints" for Fixed-Height Views in Cells

We needed a collection view cell that contained an image view and a label.

Swift

UICollectionView Self-Sizing Cells: Dynamic UILabel Layout on iOS 10

All we needed was a simple UICollectionView with just one cell that contained a label ...

RxSwift

RxSwift.Resources: Fix β€œUse of Unresolved Identifier 'Resources'”

RxSwift.Resources are being used to detect memory leaks during pre release tests. Solving Use of unresolved identifier 'Resources' error.

openssl

Sign and verify data

RSA verification process is similar to RSA encryption/decryption process with one major difference.

Android

How to choose minSdkVersion, targetSdkVersion, and compileSdkVersion

Picking your compilesdkversion, minsdkversion, targetsdkversion.

Git

Cannot lock ref ...

git remote prune origin

Git

Keeping git history clean

git rebase -i 95eeee3^

Swift

Fix Unwanted Top Padding in UICollectionView on iOS 10

On iOS 10, a collection view embedded in a view has unexpected padding at the top.

Node.js

Nodemailer 'Please log in via your web browser and then try again' error when using Gmail

While browsing our Node.js site logs we have noticed the following error...

Xcode

Fix UICollectionView β€œTerminating with Uncaught NSException” Crashes

ne of our views that contains a UICollectionView started crashing once in a while...

MySQL

Memory issues running Ghost with MySQL on tiny machines.

Unfortunately stabilizing MySQL on our tiny server was not simple and in fact the only thing that helped was a SWAP file.

Swift

ReactiveSwift flatten Operator: latest, concat, and merge Explained

The power of ReactiveSwift lies within its operators!

Swift

ReactiveSwift Playground Setup: Fix β€œNo Such Module β€˜Result’” in Xcode

According to the documentation, to use ReactiveSwift.playground the following steps must be performed...

ReactiveSwift

ReactiveSwift: The Key Difference Between Signal and SignalProducer

A property in ReactiveSwift allows us to track its changes over time.

Swift

Optimize UICollectionView and UITableView Updates with Batch Inserts in Swift

Collection view is highly optimized and works great out of the box.

Swift

Swift 3 Compiler Segmentation Fault 11: Generics and Nested Functions Workaround

The following code is causing a compiler crash when compiled with Swift 3 and Xcode 8...

Xcode

Xcode 8 Core Data: Create NSManagedObject Subclasses in a Swift Project

In Xcode 8, it is no longer possible to create NSManagedObject subclasses...

Swift

Swift Error Handling: Catching Throwing Functions with a Helper Wrapper

Recently we had a need in a general way to catch calls that can throw an exception.

Swift

Fix β€œwas deallocated while key value observers were still registered” Crashes in Swift

Debugging errors that are a result of observers being added to an object and not removed from it can be hard.

Git

Update Git to respect a newly added .gitignore

git rm -r --cached .

mongodb

Importing a Shapefile into MongoDB using GeoJSON

Shapefiles are technology from the past when desktops ruled supreme.

Swift

VIPER Architecture in Swift: How to Decouple iOS Modules

Decouple, separate, disengage, or dissociate (something) from something else.

Xcode

Debug Auto Layout Constraints with Xcode 7’s Debug View Hierarchy

A small button named 'Debug view hierarchy', displays current view hierarchy in 3D.

Swift

Using guard in Swift to Test for Empty Strings Safely

In Swift, we have a syntax candy called 'guard'..

iOS

Stack Views on iOS 8 with Auto Layout (Without UIStackView)

While starting iOS 9 we have UIStackView, it is a little bit tricky to stack views vertically or horizontally.

Xcode

iOS Auto Layout in Xcode: Position Views Relative to Each Other

Positioning views relative to one another with auto-layout was fairly tricky until...

Swift

Swift Cheat Sheet: Common Syntax, Patterns, and Shortcuts

Just a bunch of short expressions in Swift.

Nginx

Location block and rewriting URLs

URI - the part of URL that comes after the domain (or IP/Port) name.

Nginx

Renewing GoDaddy SSL certificate

Renewing a certificate is not fun so it is better to use Let's Encrypt but if that is not an option...

Ubuntu

pip IncompleteRead error after Ubuntu upgrade

After upgrading ubuntu pip started throwing the following error...

itunes

Cutting off songs early

We all understand the frustration users experience when software malfunctions...

Ubuntu

mysql2 gem error after upgrading MySQL database

After upgrading to MySQL 5.6 from 5.5 we started getting an error: Incorrect MySQL client library version!

Rails

Using environment variables under Nginx

Rails is heavily using environment variables in its configuration files.

Rails

Installing Nginx with Phusion Passenger, RVM, and Ruby on Rails on Ubuntu

Digital Ocean has a great tutorial on how to install Nginx with Phusion Passenger, RVM, and RoR on Ubuntu.

iOS

NSURL URLWithString vs fileURLWithPath: Loading Local Files Correctly in iOS

A frequent mistake when playing a local video using [AVAudioPlayer initWithContentsOfURL:url] is to use URLWithString instead of fileURLWithPath.

iOS

Fix fileExistsAtPath Always Returning NO in iOS 8 Cache Directories

Generating the path dynamically with NSSearchPathForDirectoriesInDomains.

iOS

Xcode: Set iOS App Display Name per Build Configuration

Having a different application name for release and development builds.

Python

Send Apple Push Notifications with Python 2.7

Yosemite has Python 2.7.6 built in but for many reasons (one of them is sudo) we prefer a clean up-to-date install.

osx

Thunderbolt Display firmware Update 1.2

The update just failed every time I tried to install.

Ghost

Upgrading Ghost to the latest version

Keeping Ghost installation up-to-date is important not only because of new features added but also because of all the security updates.

osx

Updating Homebrew after OS upgrade

Unfortunatrly, Homebrew breaks after an upgrade to OS X Yosemite.

iOS

Support Native iPhone 6 and 6 Plus Resolutions with Launch XIBs in iOS 8

By default all the apps (even compiled with Xcode 6 and iOS 8) will run in a scaled mode on both iPhone 6 & iPhone 6 plus.

iOS

iOS 8 Push Notifications: Fix registerForRemoteNotificationTypes Deprecation

Push notifications on iOS 8.

Git

Adding a tag

git tag -a prod-0.9.7 -m 'add analytics'

Git

Checkout a file (just one file) from a specific commit (revision)

git checkout 6c1d1862 AppConsumer/Curbsidr.xcodeproj/project.pbxproj

Xcode

Compiling Facebook SDK with Xcode 6

Compiling Facebook SDK with Xcode 6 is not yet an option.

Obj-C

Objective-C: Format Currency Strings from Double Values with NSNumberFormatter

Converting a decimal number to a currency string is simple with NSNumberFormatter.

Welcome to The infinite monkey theorem

Somewhere a monkey just typed Shakespeare in TypeScript. Be the first to read the masterpieces (and the hilarious misfires) landing on the blog.

Subscribe to The infinite monkey theorem

We fling fresh postsβ€”no banana peels attachedβ€”straight to your inbox.