Skip to content

Instantly share code, notes, and snippets.

View GoKooma's full-sized avatar

Michael Koo GoKooma

View GitHub Profile
@pksunkara
pksunkara / config
Last active April 22, 2025 22:10
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@vasanthk
vasanthk / System Design.md
Last active April 24, 2025 13: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?
@J6K
J6K / express.md
Last active March 20, 2019 19:16
express sample and quick examples and descriptions of body, params, and query

ExpressJS

All examples are using ReactJS as the frontend library and Axios as the request handler.

General

For now, think of servers as the middle man between the client and the database.

The only thing the client really needs is information from the database but it's not safe for clients to directly connect to databases and query information for themselves.

@FlorianRappl
FlorianRappl / useCarousel.ts
Last active August 16, 2024 06:30
The generic useCarousel hook.
import { useReducer, useEffect } from 'react';
import { useSwipeable, SwipeableHandlers, EventData } from 'react-swipeable';
function previous(length: number, current: number) {
return (current - 1 + length) % length;
}
function next(length: number, current: number) {
return (current + 1) % length;
}