Skip to content

Instantly share code, notes, and snippets.

View AsbDaryaee's full-sized avatar

Amir H. Moayeri AsbDaryaee

View GitHub Profile
@mberneti
mberneti / retryDynamicImport.ts
Last active September 13, 2025 07:53
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
@szemate
szemate / package-lock-conflicts.md
Last active February 2, 2026 16:45
How to resolve package-lock.json conflicts

How to resolve package-lock.json conflicts

Important

The following guide has been created for coding bootcamp participants who are new to Git and NPM and not comfortable with CLI tools. Not intended for professional developers.

It is not possible to resolve conflicts of package-lock.json in GitHub's merge tool and you need to do a manual merge.

  1. Update the master branch with the latest changes:
    git checkout master
    
@qti3e
qti3e / README.md
Last active January 12, 2026 15:29
List of file signatures and mime types based on file extensions
@hal0gen
hal0gen / _mobile-ready-web-app.html
Last active December 27, 2025 15:53 — forked from tfausak/ios-8-web-app.html
iOS + Android settings for web applications
<!doctype html>
<!-- Adapted from https://gist.github.com/tfausak/2222823 -->
<html>
<head>
<title>Mobile-ready web app</title>
<!-- CONFIGURATION -->