Skip to content

Instantly share code, notes, and snippets.

View gurusubramaniam's full-sized avatar

Gurusubramaniam gurusubramaniam

View GitHub Profile

System Design Pillars: Practical Checklist

This document outlines practical steps to achieve the four critical pillars in system design: Consistency, Availability, Scalability, and Low Latency.


1. Consistency – How to Achieve It

  • ✅ Pick the right consistency model
    → Strong, eventual, causal — based on use case (e.g. payments need strong consistency)
@gurusubramaniam
gurusubramaniam / grokking_to_leetcode.md
Created April 30, 2024 19:04 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@gurusubramaniam
gurusubramaniam / html5-video-streamer.js
Created December 19, 2017 00:21 — forked from paolorossi/html5-video-streamer.js
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
@gurusubramaniam
gurusubramaniam / Object Iteration
Created March 23, 2017 00:19
Gist for iterating through the whole nested object and replace the value with the length of the value. (BOOLEAN will be typecasted to string)
var payload = {
"ArrayObject":[{
"phone": {
"country_code":"1",
"national_number":"3045277195"
},
"phone_type":"MOBILE"
}],
"nestedObject" : {
"check" : {
@gurusubramaniam
gurusubramaniam / Git push deployment in 7 easy steps.md
Created February 11, 2017 00:47 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@gurusubramaniam
gurusubramaniam / Backbone-Example1.js
Created November 19, 2015 01:09
BackBone Example with extend,set,unset,validate,start
/**
* Example program for below learnings
* - Extending class from baseClass of baseClass (Vehicle)
* -- Validating the required attribute is present or not
* -- Logging to the user if the car is started or not
*
* - Setting the value to the new class extended from the extended Class (Car --> Vehicle --> Backbone baseClass)
* -- override method start
*
* - Create new instance for Car (car instance of Car)
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script class="jsbin" src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js" type="text/javascript"></script>
<script src="jquery.validate.cpf.js"></script>
<script type="text/javascript">
$(function () {
var $cpf = $("#id_cpf").attr("name");
var $params = {debug:false, rules:{}, messages:{}};