Skip to content

Instantly share code, notes, and snippets.

View sohhamm's full-sized avatar
🎯
Focusing

Soham Sarkar sohhamm

🎯
Focusing
View GitHub Profile
@mberneti
mberneti / retryDynamicImport.ts
Last active June 10, 2025 08:42
This utility function retryDynamicImport enhances React’s lazy loading mechanism by adding retry logic with a versioned query parameter. It retries importing a component multiple times in case of failure, which can be useful for bypassing browser cache or dealing with intermittent network issues. It can be used as a drop-in replacement for React…
// Usage:
// Replace React.lazy(() => import('x'));
// with retryDynamicImport(() => import('x'));
import { ComponentType, lazy } from 'react';
const MAX_RETRY_COUNT = 15;
const RETRY_DELAY_MS = 500;
// Regex to extract the module URL from the import statement
@eonist
eonist / My_favorite_ai_coding_prompts.md
Last active July 14, 2025 15:44
My_favorite_ai_coding_prompts.md

The art of prompt coding 🦾

Visitors GitHub Gist stars

Apps used: Cursor.so / github copilot chat / Amazon Q / codeium

img

⚠️️ Before you disregard the idea of prompt coding ⚠️️ Don't! Because everyone will be prompt-coding soon enough.

@rmiyazaki6499
rmiyazaki6499 / deploy-mern.md
Last active June 24, 2024 15:47
Deploying a Production ready React-Express app on AWS EC2 with CI/CD

Deploying a Production ready React-Express app on AWS

In this tutorial, I will be going over to how to deploy a Javascript app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app AlgoAcademy (a resource for reviewing algorithms and data structures) and we wanted to share with other developers some of the lessons we learned along the way.

Following this tutorial, you will have an application that has:

  • A React frontend, Express backend
  • An AWS EC2 server configured to host your application
  • SSL-certification with Certbot
  • A custom domain name
@vasanthk
vasanthk / System Design.md
Last active July 22, 2025 07:48
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@josephspurrier
josephspurrier / values_pointers.go
Last active May 15, 2025 14:43
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value