Skip to content

Instantly share code, notes, and snippets.

@beibeiJ
beibeiJ / System Design.md
Created April 20, 2024 15:40 — forked from vasanthk/System Design.md
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?
@beibeiJ
beibeiJ / git.migrate
Created January 27, 2021 18:02 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@beibeiJ
beibeiJ / gg_qqplot.R
Created June 14, 2018 15:38 — forked from slowkow/gg_qqplot.R
Create a Q-Q plot with ggplot2
#' Create a quantile-quantile plot with ggplot2.
#'
#' Assumptions:
#' - Expected P values are uniformly distributed.
#' - Confidence intervals assume independence between tests.
#' We expect deviations past the confidence intervals if the tests are
#' not independent.
#' For example, in a genome-wide association study, the genotype at any
#' position is correlated to nearby positions. Tests of nearby genotypes
#' will result in similar test statistics.