Skip to content

Instantly share code, notes, and snippets.

View thamsrang's full-sized avatar

Thams thamsrang

  • Chennai, Tamil Nadu, India
View GitHub Profile

Currying

Currying is the technique of translating the evaluation of a function that takes multiple arguments (or a tuple of arguments) into evaluating a sequence of functions, each with a single argument. Example:

var currier = function(fn) {
  var args = Array.prototype.slice.call(arguments, 1);
  return function() {
    return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, 0))); 
  }
}
@thamsrang
thamsrang / json-web-token.md
Last active March 8, 2019 07:49
JSON Web Tokens - jwt.io

What is JWT

  • JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.
  • The token is composed of a header, a payload, and a signature.
  • The purpose of using JWT is NOT to hide or obscure data in any way. The reason why JWT are used is to prove that the sent data was actually created by an authentic source.
  • Since JWT are signed and encoded only, and since JWT are not encrypted, JWT do not guarantee any security for sensitive data.

Learn

@thamsrang
thamsrang / service-checklist.md
Last active August 7, 2019 16:56 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@thamsrang
thamsrang / webpack.md
Last active May 9, 2019 02:57
#webpack
@thamsrang
thamsrang / rxjs.md
Last active July 2, 2019 10:42
#rxjs
@thamsrang
thamsrang / Git.md
Last active December 10, 2018 06:06
  1. what is git ?
  2. what is difference between git and github and gitlab?
  3. any other version control tools other git? -->svn
  4. what is difference between svn and git?
  5. what is merge conflicts have you faced ever in you experience? if you face how you resolve?
  6. what is git stash?
  7. what is git HEAD?
  8. what is staging area in git?
  9. what is difference between git fetch and pull and clone?
  10. what is difference between git merge and rebase?