Skip to content

Instantly share code, notes, and snippets.

View thediehl's full-sized avatar

Billy Diehl thediehl

  • Spanish Fort, AL
View GitHub Profile
@vasanthk
vasanthk / System Design.md
Last active May 4, 2024 16:39
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?
@jiggzson
jiggzson / scientificToDecimal.js
Last active December 25, 2022 21:03
Converts a javascript number from scientific notation to a decimal string
var scientificToDecimal = function (num) {
var nsign = Math.sign(num);
//remove the sign
num = Math.abs(num);
//if the number is in scientific notation remove it
if (/\d+\.?\d*e[\+\-]*\d+/i.test(num)) {
var zero = '0',
parts = String(num).toLowerCase().split('e'), //split into coeff and exponent
e = parts.pop(), //store the exponential part
l = Math.abs(e), //get the number of zeros