I hereby claim:
- I am skew202 on github.
- I am stefanwiest (https://keybase.io/stefanwiest) on keybase.
- I have a public key ASDHlNllwL8rhlYUlUV3xZHX-ug11VAiUxAwRe4Und6JcAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import os | |
import numpy as np | |
import scipy.misc | |
import scipy.io | |
import math | |
import tensorflow as tf | |
from sys import stderr | |
from functools import reduce | |
import time |
Most of what is written here is not at all specific to Kubernetes, but it bears being written down in the hope that it will occasionally remind people of "best practices" around code reviews.
You've just had a brilliant idea on how to make Kubernetes better. Let's call that idea "Feature-X". Feature-X is not even that complicated. You have a pretty good idea of how to implement it. You jump in and implement it, fixing a bunch of stuff along the way. You send your PR - this is awesome! And it sits. And
# Type(<scope>): <subject> | |
# <body> | |
# <footer> | |
# Type should be one of the following: | |
# * feat (new feature) | |
# * fix (bug fix) | |
# * docs (changes to documentation) |
// querystringvalues.js | |
// https://github.com/bgrins/devtools-snippets | |
// Print out key/value pairs from querystring. | |
(function() { | |
var url = location; | |
var querystring = location.search.slice(1); | |
var tab = querystring.split("&").map(function(qs) { | |
return { "Key": qs.split("=")[0], "Value": qs.split("=")[1], "Pretty Value": decodeURIComponent(qs.split("=")[1]).replace(/\+/g," ") } |
// plainforms.js | |
// https://github.com/bgrins/devtools-snippets | |
// Remove HTML5 form features (validations and special input types). | |
(function () { | |
['maxlength', 'required', 'min', 'max', 'pattern', 'step' ].forEach(function (attr) { | |
[].forEach.call(document.querySelectorAll("[" + attr + "]"), function (node) { | |
node.removeAttribute(attr); | |
}); |
// performance.js | |
// https://github.com/bgrins/devtools-snippets | |
// Print out window.performance information. | |
// https://developer.mozilla.org/en-US/docs/Navigation_timing | |
(function () { | |
var t = window.performance.timing; | |
var lt = window.chrome && window.chrome.loadTimes && window.chrome.loadTimes(); | |
var timings = []; |
// dataurl.js | |
// https://github.com/bgrins/devtools-snippets | |
// Print out data URLs for all images / canvases on the page. | |
(function() { | |
console.group("Data URLs"); | |
[].forEach.call(document.querySelectorAll("img"), function(i) { | |
var c = document.createElement("canvas"); |
// allcolors.js | |
// https://github.com/bgrins/devtools-snippets | |
// Print out CSS colors used in elements on the page. | |
(function () { | |
// Should include colors from elements that have a border color but have a zero width? | |
var includeBorderColorsWithZeroWidth = false; | |
var allColors = {}; | |
var props = ["background-color", "color", "border-top-color", "border-right-color", "border-bottom-color", "border-left-color"]; |
//Using $$ | |
[].forEach.call($$("*"),function(a){ | |
a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16) | |
}) | |
//Using document.querySelectorAll: | |
[].forEach.call(document.querySelectorAll("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)}) |