Skip to content

Instantly share code, notes, and snippets.

View nelsonfrank's full-sized avatar
🎯
Focusing

Nelson Frank nelsonfrank

🎯
Focusing
View GitHub Profile

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@nelsonfrank
nelsonfrank / gist:0718c7375b556d8eed8820a4fc4af69c
Last active May 23, 2022 09:01 — forked from Jbot29/gist:b84e5e2c6275d963f7f6
Ecommerce User Stories + Steps

User Stories - Overview

  1. Authentication: User can signup/login/logout

  2. Items for sale: User can view lists of items for sale and search by name, filter by price.

  3. Shopping Cart: User can add items to shopping cart and the app remembers it next time you login. User can view all the items in their shopping cart. User can delete items in the shopping cart. Shopping cart uses an integer column to store "state".

  4. Checkout: User can fill in form and submit billing info. After submitting billing info, items in the shopping cart will move to a different "state".

@nelsonfrank
nelsonfrank / tech-stack-plan.md
Last active May 24, 2022 07:53 — forked from jeffkayser/tech-stack-plan.md
Template for Planning a Technology Stack

Tech stack

Frontend Server

UI Framework

  • React
  • Nextjs
  • Typescript
@nelsonfrank
nelsonfrank / .1-Instructions.md
Created June 2, 2022 11:17 — forked from sayadi/.1-Instructions.md
How to SSH to an AWS EC2 Instance Running Linux from a CircleCI 2 Build

How to SSH to an AWS EC2 Instance Running Linux from a CircleCI 2 Build

The Problem

If you use EC2 to host your application, and a tool like CircleCI to automate the deployment of new versions of your application, chances are, you've run into the problem of Circle not being able to SSH into your servers.

The problem is Circle could change the public IP of your runner for every new Build which prevents it from being able to access (SSH) the EC2 Instance. Unfortunately, Circle is not able to provide a list of public IP addresses to whitelist on a Security Group attached to the EC2 Instance. More on this here: https://discuss.circleci.com/t/circleci-source-ip/1202

@nelsonfrank
nelsonfrank / Mock external package in unit test.md
Last active March 29, 2023 10:38
Why do we mock external package while writing unit test

Mocking external packages during unit testing can be beneficial for several reasons:

  • Isolation: By mocking external dependencies, you can isolate the code being tested from external systems or dependencies, making it easier to identify and troubleshoot issues in the code being tested. This is particularly important when testing code that interacts with external systems, such as databases or APIs.

  • Consistency: External systems can be unpredictable and may change over time, which can cause test results to be inconsistent. By mocking external dependencies, you can create a consistent test environment that is not affected by changes in external systems.

@nelsonfrank
nelsonfrank / tutorial.md
Created May 18, 2023 06:18 — forked from Makeshift/tutorial.md
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

@nelsonfrank
nelsonfrank / http_streaming.md
Created July 22, 2023 08:48 — forked from CMCDragonkai/http_streaming.md
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@nelsonfrank
nelsonfrank / working_effectively_with_legacy_code.md
Created August 10, 2025 20:28 — forked from jonnyjava/working_effectively_with_legacy_code.md
Working effectively with legacy code summary

WORKING EFFECTIVELY WITH LEGACY CODE

To me, legacy code is simply code without tests. I’ve gotten some grief for this definition. What do tests have to do with whether code is bad? To me, the answer is straightforward, and it is a point that I elaborate throughout the book: Code without tests is bad code. It doesn’t matter how well written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse.

Chapter 1 Changing Software

Four Reasons to Change Software: For simplicity’s sake, let’s look at four primary reasons to change software.