Skip to content

Instantly share code, notes, and snippets.

kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@thecodejack
thecodejack / System Design.md
Created November 18, 2019 17:48 — 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?
@thecodejack
thecodejack / chrome.md
Last active August 29, 2015 14:15 — forked from mantoni/chrome.md

Command line args:

--js-flags="--stack-trace-limit 20"
// {{compare unicorns ponies operator="<"}}
// I knew it, unicorns are just low-quality ponies!
// {{/compare}}
//
// (defaults to == if operator omitted)
//
// {{equal unicorns ponies }}
// That's amazing, unicorns are actually undercover ponies
// {{/equal}}
// (from http://doginthehat.com.au/2012/02/comparison-block-helper-for-handlebars-templates/)

JSConf Slides, Codes and Notes

These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.

Modular frontend with NPM - Jake Verbaten (@Raynos)

@thecodejack
thecodejack / Custom.css
Created May 6, 2014 09:31
Zero-Dark-Matrix theme gist for Chrome Dev tools
/*****************************************************************************/
/* Zero-Dark-Matrix
/* Optimized for Chrome Stable Channel v32
/* https://github.com/mauricecruz/zero-base-themes
/*************************************************************************/
#-blink-dev-tools .panel.sources .split-view-vertical .split-view-contents {
-webkit-transition: right 0.5s ease-in-out;
}
#-blink-dev-tools .panel.sources .split-view-contents-second.split-view-sidebar {
var ajaxPromise = function(url, options){
return Ember.RSVP.Promise(function(resolve, reject) {
var options = options || {};
options.success = function(data){
resolve(data);
};
options.error = function(jqXHR, status, error){
@thecodejack
thecodejack / prototype.js
Last active December 23, 2015 10:09
My Experiments with prototype.js
//create a object
var Person = {name:'Adi'};
//create another empty object
var apk = {};
apk.__proto__ === apk.prototype
//returns false
//just FYI prototype is available for functions
@thecodejack
thecodejack / weirdness1.js
Last active December 22, 2015 00:08
Weird Javascript
parseFloat( 'Infinity' ) // returns Infinity
Number( 'Infinity' ) // returns Infinity
parseInt( 'Infinity' ) // returns NaN
//This happens even when we pass any radix.