Skip to content

Instantly share code, notes, and snippets.

kops cluster config

kubeAPIServer:
  authorizationMode: RBAC
  authorizationRbacSuperUser: admin
  oidcCAFile: /srv/kubernetes/ca.crt
  oidcClientID: example
  oidcGroupsClaim: groups
  oidcIssuerURL: https://dex.example.com
  oidcUsernameClaim: email

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@acolyer
acolyer / service-checklist.md
Last active January 30, 2024 17:39
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?
@stuart-warren
stuart-warren / lineWithFocusChart-opentsdb.html
Last active December 16, 2015 01:19
Takes a URL to the ascii output of opentsdb and outputs json in a format easily used by the NVD3.js graph library (at least lineWithFocusChart) Will probably build on this to create a nicer frontend / dashboard NVD3 (http://nvd3.org/) - D3 js library OpenTSDB (http://opentsdb.net/) - Metric collection tool
<!DOCTYPE html>
<meta charset="utf-8">
<!-- this works from within the examples folder -->
<link href="../src/nv.d3.css" rel="stylesheet" type="text/css">
<style>
body {
@ryankearney
ryankearney / ComcastInject.html
Last active June 10, 2023 14:40
This is the code Comcast is injecting into its users web traffic.
<script language="JavaScript" type="text/javascript">
// Comcast Cable Communications, LLC Proprietary. Copyright 2012.
// Intended use is to display browser notifications for critical and time sensitive alerts.
var SYS_URL='/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do';
// var image_url='http://servicealerts.comcast.net:8080/images/mt';
var image_url='http://xfinity.comcast.net/constantguard/BotAssistance/notice/images';
var headertext1='<strong>Comcast Courtesy Notice</strong>';
var textline1='You have reached 90% of your <b>monthly data usage allowance</b>.';
var textline2='Please sign in for more information and to remove this alert.';
var acknowledgebutton='<a href=\"#\" onClick="document.location.href=\''+SYS_URL+'?dispatch=redirect&redirectName=login&paramName=bmUid\'" title="Sign in to acknowledge" style="color: #FFFFFF;"><img alt="Sign in to acknowledge" src="'+image_url+'/mt_signin.png"/></a>';
@banker
banker / set_benchmark.rb
Created August 30, 2012 16:32
Which of these is the fastest?
x = 10000.times.to_a
a,b,c = x.dup, x.dup, x.dup
Benchmark.measure { 1000.times { out = []; out += a; out += b; out +=c; out.uniq! } }
Benchmark.measure { 1000.times { out = Set.new; out += a; out += b; out +=c; } }
Benchmark.measure { 1000.times { out = {}; a.each {|e| out[e] ||= 1}; b.each {|e| out[e] ||= 1}; c.each {|e| out[e] ||= 1}; } }
@megakorre
megakorre / rust-poly.md
Created August 8, 2012 21:47
blog: rust pollymorpism

EDIT! full code can be found here gist

So I played around with rust a bit now. And I thought I might share some random stuff.

So say you wanted to represent a expression tree with plus and minus nodes and a node for values. One way to do this would be to use rust's enum's.

In rust enums are like haskell's union types so you can specify the different values to be constructors carrying data.

@sax
sax / gist:3113693
Created July 14, 2012 22:24
set up basic zone in SmartOS within VirtualBox
## Set up SmartOS in VirtualBox
# http://www.perkin.org.uk/posts/automated-virtualbox-smartos-installs.html
# set up global zone with Joyent datasets
if [[ ! -e /var/db/imgadm/sources.list || `grep -v "https://datasets.joyent.com/datasets" /var/db/imgadm/sources.list` ]]; then
echo "https://datasets.joyent.com/datasets" >> /var/db/imgadm/sources.list
fi
imgadm update
@hugoduncan
hugoduncan / gist:2839891
Created May 31, 2012 00:41
OAuth with friend and oauthentic
(ns myapp.authenticate.oauth
"OAuth authentication"
(:require
[cheshire.core :as json]
[clj-http.client :as http]
[clojure.string :as string]
[clojure.tools.logging :as logging])
(:use
[oauthentic.core :only [build-authorization-url fetch-token]]
[ring.util.response :only [redirect]]
@rossnelson
rossnelson / postgres-queries.rst
Created April 28, 2012 18:04 — forked from madelfio/postgres-queries.rst
Useful Postgres Admin Queries

Useful Postgres Admin Queries

  • pg_stat_activity (currently executing queries):

    select * from pg_stat_activity where current_query not like '<%';
  • pg_user (all database users):

    select * from pg_user;