Skip to content

Instantly share code, notes, and snippets.

💭
Why tho

SpencerMalone

💭
Why tho
Block or report user

Report or block SpencerMalone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SpencerMalone
SpencerMalone / PromExampleOutput.md
Created Apr 11, 2019
Help find your worst prometheus metric sources by tokenizing metric names
View PromExampleOutput.md

./get-prom-metric-tree.py https://myprom.com 5 should dump the top 5 metric roots. When run against our prom...

{
    "kube": {
        "tree_count": 104
    }, 
    "stuff": {
        "tree_count": 14896
    }, 
@SpencerMalone
SpencerMalone / ExampleOutput.md
Last active Apr 11, 2019
Help find your worst prometheus metric sources by tokenizing metric names
View ExampleOutput.md

./get-prom-metric-tree.py https://myprom.com 5 should dump the top 5 metric roots. When run against our prom...

{
    "kube": {
        "tree_count": 104
    }, 
    "stuff": {
        "tree_count": 14896
    }, 
@SpencerMalone
SpencerMalone / escape_test.go
Last active Apr 4, 2019 — forked from bakins/escape_test.go
compare escapeMetricName
View escape_test.go
package main
import (
"golang.org/x/text/unicode/rangetable"
"regexp"
"testing"
"unicode"
)
var validMetric = rangetable.New([]rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")...)
View gist:b21f649c5275650535292d6844bb84df
2018-12-03 20:59:23.412 ERROR --- [qtp310452117-34] StackTrace : Full Stack Trace:
org.eclipse.jgit.api.errors.JGitInternalException: Cannot lock /var/rundeck/projects/<redacted>/scm/.git/index
at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:316)
at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:126)
at java_util_concurrent_Callable$call$0.call(Unknown Source)
at org.rundeck.plugin.scm.git.GitExportPlugin$_clusterFixJobs_closure2.doCall(GitExportPlugin.groovy:529)
at sun.reflect.GeneratedMethodAccessor1188.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
@SpencerMalone
SpencerMalone / goroutine-stacks-2018-09-05T012443Z.log
Created Sep 5, 2018
goroutine-stacks-2018-09-05T012443Z.log
View goroutine-stacks-2018-09-05T012443Z.log
cat /var/run/docker/goroutine-stacks-2018-09-05T012443Z.log
goroutine 146 [running]:
github.com/docker/docker/pkg/signal.DumpStacks(0x5653887c8079, 0xf, 0x0, 0x0, 0x0, 0x0)
/root/rpmbuild/BUILD/src/engine/.gopath/src/github.com/docker/docker/pkg/signal/trap.go:83 +0xaa
github.com/docker/docker/daemon.(*Daemon).setupDumpStackTrap.func1(0xc4205c43c0, 0x5653887c8079, 0xf)
/root/rpmbuild/BUILD/src/engine/.gopath/src/github.com/docker/docker/daemon/debugtrap_unix.go:19 +0x79
created by github.com/docker/docker/daemon.(*Daemon).setupDumpStackTrap
@SpencerMalone
SpencerMalone / Dockerfile
Created Jun 24, 2017
Headless Ozone Chrome Builder. Results in very large unclean image (18.6 gb)
View Dockerfile
FROM ubuntu:16.04
# Install Chromium build dependencies.
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty multiverse" >> /etc/apt/sources.list # && dpkg --add-architecture i386
RUN apt-get update && apt-get install -qy git build-essential clang curl
RUN curl -L https://gist.githubusercontent.com/SpencerMalone/2345d216e61f4ddf9d54c5250af37a0f/raw/42fd576fc1ad2ed5b2748c20d67d471881516ac2/install-build-deps.sh > /tmp/install-build-deps.sh
RUN apt-get update && apt-get install -qy lsb-release sudo locales
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
RUN chmod +x /tmp/install-build-deps.sh
RUN /tmp/install-build-deps.sh --no-prompt --no-arm --no-chromeos-fonts --no-nacl
@SpencerMalone
SpencerMalone / install-build-deps.sh
Created Jun 9, 2017
chrome install-build-deps.sh
View install-build-deps.sh
#!/bin/bash -e
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Script to install everything needed to build chromium (well, ideally, anyway)
# See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md
usage() {
echo "Usage: $0 [--options]"
echo "Options:"
echo "--[no-]syms: enable or disable installation of debugging symbols"
You can’t perform that action at this time.