Skip to content

Instantly share code, notes, and snippets.

View aikin's full-sized avatar
🎯
Focusing

Kin Lu aikin

🎯
Focusing
View GitHub Profile
@aikin
aikin / clone-bahmni-code.sh
Last active August 3, 2024 13:03 — forked from gsluthra/clone-bahmni-code.sh
Clone all Bahmni EMR & Hospital system global product code and India ABDM code.
#!/bin/bash
## ------------------
## Bahmni Code Repos
## ------------------
echo "Creating folder: bahmni-global"
mkdir bahmni-global
cd bahmni-global/
@aikin
aikin / Designing Event-Driven Systems links.md
Created May 6, 2022 11:18 — forked from giampaolotrapasso/Designing Event-Driven Systems links.md
List of links from Designing Event-Driven Systems by Ben Stopford
@aikin
aikin / System Design.md
Created March 2, 2021 05:38 — 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?
@aikin
aikin / latency.txt
Created January 24, 2021 07:31 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@aikin
aikin / population-try
Last active September 27, 2019 05:53
mongoose-population
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var ObjectId = mongoose.Types.ObjectId;
console.log('Running mongoose version %s', mongoose.version);
var UserSchema = new Schema({
name : String,
posts : [{
type : Schema.Types.ObjectId,
@aikin
aikin / gulpfile.js
Last active August 29, 2015 14:08 — forked from hansent/gulpfile.js
//gulp & plugins
var gulp = require('gulp');
var gutil = require('gulp-util');
var jshint = require('gulp-jshint');
var browserify = require('gulp-browserify');
var jade = require('gulp-jade');
var stylus = require('gulp-stylus');
var mocha = require('gulp-mocha');
var nodemon = require('gulp-nodemon');
var livereload = require('gulp-livereload');
@aikin
aikin / Gulpfile.js
Last active August 29, 2015 14:08 — forked from Hendrixer/Gulpfile.js
var gulp = require('gulp'),
concat = require('gulp-concat'),
plumber = require('gulp-plumber'),
server = require('tiny-lr')(),
refresh = require('gulp-livereload'),
mocha = require('gulp-mocha'),
stylus = require('gulp-stylus'),
notify = require('gulp-notify'),
nodemon = require('gulp-nodemon'),
jshint = require('gulp-jshint'),