Skip to content

Instantly share code, notes, and snippets.

@donli1210
donli1210 / System Design.md
Created May 1, 2018 18:08 — 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?
@donli1210
donli1210 / script.js
Created December 4, 2017 21:03
Beasts Question No. 3
// Beasts Question No. 3
// librarySystem with dependencies
// https://github.com/gordonmzhu/beasts/issues/1
(function() {
var libraryStorage = {};
@donli1210
donli1210 / run_with_debugger.js
Last active December 2, 2017 12:39
Improving runWithDebugger
function runWithDebugger(callback, argsArray) {
debugger;
return callback.apply(null, argsArray);
}
@donli1210
donli1210 / gist:e06d41f4b2c288cc026cc86b8f387b38
Created June 30, 2017 16:54 — forked from philfreo/gist:0a4d899de4257e08a000
4 different ways to save a Highcharts chart as a PNG (with and without a server)
// Method 1: simply use Highcharts built-in functionality (SVG -> Highcharts server -> PNG)
// Downside: won't work in webview native apps that don't handle the form response
highcharts.exportChart({
filename: filename
});