Skip to content

Instantly share code, notes, and snippets.

@ih2502mk
ih2502mk / list.md
Last active October 24, 2025 06:44
Quantopian Lectures Saved
@tannerlinsley
tannerlinsley / README.md
Last active August 28, 2025 19:52
Replacing Create React App with the Next.js CLI

Replacing Create React App with the Next.js CLI

How dare you make a jab at Create React App!?

Firstly, Create React App is good. But it's a very rigid CLI, primarily designed for projects that require very little to no configuration. This makes it great for beginners and simple projects but unfortunately, this means that it's pretty non-extensible. Despite the involvement from big names and a ton of great devs, it has left me wanting a much better developer experience with a lot more polish when it comes to hot reloading, babel configuration, webpack configuration, etc. It's definitely simple and good, but not amazing.

Now, compare that experience to Next.js which for starters has a much larger team behind it provided by a world-class company (Vercel) who are all financially dedicated to making it the best DX you could imagine to build any React application. Next.js is the 💣-diggity. It has amazing docs, great support, can grow with your requirements into SSR or static site generation, etc.

So why

@darwinsubramaniam
darwinsubramaniam / forRootAndForFeature.md
Last active January 31, 2024 08:37
The Explaination of forRoot and ForFeature

ForRoot

This is useful when the registerAs is required across, so it is best to use it in the AppModule

import databaseConfig from './config/database.config';
@Module({
  imports: [
    ConfigModule.forRoot({
      load: [databaseConfig],
 }),

Migrating @reach/router to React Router v6

Note: This document is still a work in progress! Please let us know where it lacks so we can make the migration as smooth as possible!

Introduction

When we set out to build React Router v6, from the perspective of @reach/router users, we had these goals:

  • Keep the bundle size low. Turns out we got it smaller than @reach/router
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active October 15, 2025 00:28
Building a react native app in WSL2

So, are you building microservices? Take a look at a few of these symptoms, and decide for yourself:

  • ❌ A change to one microservice often requires changes to other microservices
  • ✅ Deploying one microservice requires other microservices to be deployed at the same time
  • ❓ Your microservices are overly chatty
  • ❌ The same developers work across a large number of microservices
  • ✅ Many of your microservices share a datastore
  • ✅ Your microservices share a lot of the same code or models
@angeloashmore
angeloashmore / withDefaultProps.js
Created September 19, 2019 21:52
React HOC to automatically apply a component's default props before provided props.
import React from 'react'
import hoistNonReactStatics from 'hoist-non-react-statics'
// Returns the components name. If a name cannot be determined, "Component" is
// used.
const getComponentName = Component =>
Component.displayName || Component.name || 'Component'
// Higher order component that automatically applies default props to the
// wrapped component.
@haxoza
haxoza / docker-compose.yml
Created July 24, 2019 11:11
Local S3 with Minio and created bucket on startup
version: '3'
services:
minio:
image: minio/minio:RELEASE.2019-07-17T22-54-12Z
volumes:
- data:/data
ports:
- "9000:9000"
networks:
@sibelius
sibelius / drawerStyled.tsx
Created July 16, 2019 14:54
how to use styled-components instead of clsx
const styles = theme => ({
drawer: {
position: 'absolute',
overflowX: 'hidden',
zIndex: theme.zIndex.drawer + 2,
[theme.breakpoints.up('sm')]: {
position: 'relative',
width: drawerWidth,
flexShrink: 0,
@androidfred
androidfred / kotlin_dsl.md
Last active February 27, 2021 01:26
Kotlin DSLs

Kotlin in Action: DSLs

General purpose programming language

  • imperative (sequence of stateful, ordered steps that describe how to do something)
  • wide scope
  • Java, Bash etc
  • potential for "runtime errors"

DSL (Domain Specific Language)

  • declarative (describes what something is, not how to do it)