Skip to content

Instantly share code, notes, and snippets.

diff --git a/staging/src/k8s.io/apimachinery/pkg/util/net/http.go b/staging/src/k8s.io/apimachinery/pkg/util/net/http.go
index c24fbc6921c..e499f2a18e0 100644
--- a/staging/src/k8s.io/apimachinery/pkg/util/net/http.go
+++ b/staging/src/k8s.io/apimachinery/pkg/util/net/http.go
@@ -30,6 +30,7 @@ import (
"path"
"strconv"
"strings"
+ "time"
@PaulFurtado
PaulFurtado / generate_name.py
Created November 19, 2019 03:04
A python implementation of generating pod names from the metadata.generateName field for use in mutating webhook admission controllers
import random
def generate_name(prefix):
"""
Generates a name for a resource in the same way the Kubernetes API servers
would (appending a suffix of up to 5 random alphanumeric characters).
"""
# no vowels, so "bad words" can't be formed
alphanums = 'bcdfghjklmnpqrstvwxz2456789'

This is a kernel 4.14.133 backport of:

[PATCH v6 1/1] sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices

From Dave Chiluk's patch here: https://lkml.org/lkml/2019/7/23/673


Results of Dave's fibtest reproducer (https://github.com/indeedeng/fibtest)

On a c5.9xlarge ec2 instance:

  • CPU: 36 core Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
@PaulFurtado
PaulFurtado / kubelet-flamegraph.svg.gz
Last active September 21, 2017 01:05
kubelet-flamegraph.svg.gz
@PaulFurtado
PaulFurtado / gevent_bad_run_log
Created August 12, 2016 07:07
gevent run log when using failed build
/usr/share/hubspot/mesos/slaves/86ba9c2c-2d98-444d-89c9-21167b58fd4a-S39/frameworks/sy3x3/executors/32y3n/runs/300e6114-4795-41a8-9505-faebab447ebc/tqdash_web-web-14_19_19-1470964906090-1-quick_base.iad03.hubspot_networks.net-us_east_1e/app/.deploy_virtualenv/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6
DeprecationWarning
Traceback (most recent call last):
File "/usr/share/hubspot/mesos/slaves/86ba9c2c-2d98-444d-89c9-21167b58fd4a-S39/frameworks/sy3x3/executors/32y3n/runs/300e6114-4795-41a8-9505-faebab447ebc/tqdash_web-web-14_19_19-1470964906090-1-quick_base.iad03.hubspot_networks.net-us_east_1e/app/.deploy_virtualenv/lib/python2.6/site-packages/gevent/corecffi.py", line 18, in <module>
import gevent._corecffi
ImportError: /usr/share/hubspot/mesos/slaves/86ba9c2c-2d98-444d-89c9-21167b58fd4a-S39/frameworks/sy3x3/executors
@PaulFurtado
PaulFurtado / build_log
Created August 12, 2016 06:47
gevent build failure
CFLAGS=-std=c99 python setup.py build
Running 'make ' in /home/pfurtado/dev/gevent
/home/pfurtado/dev/gevent-env/bin/python util/cythonpp.py -o gevent.corecext.c --module-name gevent.libev.corecext.pyx src/gevent/libev/corecext.ppyx
Running cython -o /tmp/tmplSC1TL/gevent.corecext.c -I src/gevent/libev -I src/gevent /tmp/tmplSC1TL/gevent.libev.corecext.pyx # !EV_USE_SIGNALFD && defined(LIBEV_EMBED) && !defined(_WIN32) hash:8d0d56cd291af2de92ce1cb35c306dc8Running cython -o /tmp/tmp7nPHjU/gevent.corecext.c -I src/gevent/libev -I src/gevent /tmp/tmp7nPHjU/gevent.libev.corecext.pyx # !EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32) hash:b617980bd87606c53168a4bbb866b468
Running cython -o /tmp/tmpmEp5lM/gevent.corecext.c -I src/gevent/libev -I src/gevent /tmp/tmpmEp5lM/gevent.libev.corecext.pyx # EV_USE_SIGNALFD && defined(LIBEV_EMBED) && defined(_WIN32) hash:e3c6772cd0e5d6f10667bf1e44bb443e
Running cython -o /tmp/tmp8DRTL9/gevent.corecext.c -I src/gevent/libev -I src/gevent /tmp/tmp8DRTL9/gevent.lib
@PaulFurtado
PaulFurtado / bash_history.sh
Created September 24, 2015 02:01
bashrc custom history
__lastcmd="$(history 1 | sed 's/^[ ]*[0-9]\+[ ]*//')"
HISTORY_FILE=~/.bash_eternal_history
function __prompt_cmd() {
local lastexit="$?"
local cmdstr="$(history 1 | sed 's/^[ ]*[0-9]\+[ ]*//')"
local logstr="DATE='$(date -Iseconds)' PID=$$ USER=$USER PWD='$PWD' EXIT_CODE=$lastexit COMMAND=$cmdstr"
if [[ "$cmdstr" != "$__lastcmd" ]] ; then
@PaulFurtado
PaulFurtado / gist:a0f5087692f365670204
Created February 18, 2015 07:42
/etc/dhclient.conf
send host-name = pick-first-value(gethostname(), "ISC-dhclient");
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name, domain-search;