Skip to content

Instantly share code, notes, and snippets.

View sengupta's full-sized avatar

Aditya Sengupta sengupta

View GitHub Profile
@sengupta
sengupta / service-checklist.md
Created February 12, 2018 19:38 — 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?
@sengupta
sengupta / gateway_routing_logic_samples
Created March 31, 2016 07:47 — forked from ramanathanrv/gateway_routing_logic_samples
Routing Logic for choosing the best gateway to handle your transaction
// WARNING: This code is a sample to test your logic of gateway priority. This is NOT to be used as such.
def order = [order_id: "ord_id", amount: 1000.00, udf1:"web", udf2: "desktop", gateway_id: 2]
def txn = [txn_id: "txn_id", express_checkout: true, add_to_locker: false ]
def payment = [card_isin: "524368", card_issuer: "HDFC Bank", card_type: "CREDIT"]
def setGatewayPriority = { gateways ->
println "priority: " + gateways;
}
<html>
<head>
<title>FaS Reader</title>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// Fast as Sanic Reader
var left = $('<span />').attr('id', 'left'),
@sengupta
sengupta / lighting_talk.rst
Created April 5, 2012 19:45 — forked from GaelVaroquaux/lighting_talk.rst
Bootstrapping a SciPy-related community project

Bootstrapping a SciPy-related community project

This document is a lightning talk: it only gives pointers, you need to Google and read references

Goal

@sengupta
sengupta / JavaScript
Created December 11, 2011 20:02 — forked from apnerve/like
Facebook like bookmarklet
javascript:(function(){try{var%20url=encodeURIComponent(location.href);var%20ifr=document.createElement('iframe');ifr.style.position='absolute';ifr.style.top=10+'px';ifr.style.left=10+'px';ifr.style.width=450+'px';ifr.style.height=100+'px';ifr.style.border='none';ifr.style.backgroundColor="#fff";ifr.src='http://www.facebook.com/plugins/like.php?href='+url+'&show_faces=true&width=450&action=like&colorscheme=light';ifr.scrolling='no';ifr.frameborder=0;document.getElementsByTagName('body')[0].appendChild(ifr);}catch(e){}})();