Skip to content

Instantly share code, notes, and snippets.

View gist:ad75d68da39843d37ad832a1c552b229
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
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?
@thecodejack
thecodejack / chrome.md
Last active August 29, 2015 14:15 — forked from mantoni/chrome.md
View chrome.md

Command line args:

--js-flags="--stack-trace-limit 20"
View gist:a8de97f4ec410ea23722
// {{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/)
View jsconf_slides_codes_and_notes.md

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
View Custom.css
/*****************************************************************************/
/* 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 {
View rsvpAjax.js
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
View 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
View weirdness1.js
parseFloat( 'Infinity' ) // returns Infinity
Number( 'Infinity' ) // returns Infinity
parseInt( 'Infinity' ) // returns NaN
//This happens even when we pass any radix.