Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Rupesh Dabbir rupeshdabbir

🎯
Focusing
Block or report user

Report or block rupeshdabbir

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rupeshdabbir
rupeshdabbir / nativeJavaScript.js
Created Feb 15, 2018 — forked from alexhawkins/nativeJavaScript.js
Implementation of Native JavaScript Methods (forEach, Map, Filter, Reduce, Every, Some)
View nativeJavaScript.js
'use strict';
/*****************NATIVE forEACH*********************/
Array.prototype.myEach = function(callback) {
for (var i = 0; i < this.length; i++)
callback(this[i], i, this);
};
//tests
@rupeshdabbir
rupeshdabbir / System Design.md
Created Jul 25, 2017 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

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?
@rupeshdabbir
rupeshdabbir / squirt.js
Created Mar 29, 2017 — forked from joelpt/squirt.js
Manually calculate the square root of a number with Javascript
View squirt.js
// The Babylonian Method
// http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
// @param n - the number to compute the square root of
// @param g - the best guess so far (can omit from initial call)
function squirt(n, g) {
if (!g) {
// Take an initial guess at the square root
g = n / 2.0;
}
var d = n / g; // Divide our guess into the number
You can’t perform that action at this time.