Skip to content

Instantly share code, notes, and snippets.

View SpencerMalone's full-sized avatar

SpencerMalone

View GitHub Profile
@SpencerMalone
SpencerMalone / install-build-deps.sh
Created June 9, 2017 13:19
chrome 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"
@SpencerMalone
SpencerMalone / Dockerfile
Created June 24, 2017 14:52
Headless Ozone Chrome Builder. Results in very large unclean image (18.6 gb)
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 / goroutine-stacks-2018-09-05T012443Z.log
Created September 5, 2018 13:36
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
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 / escape_test.go
Last active April 4, 2019 21:13 — forked from bakins/escape_test.go
compare escapeMetricName
package main
import (
"golang.org/x/text/unicode/rangetable"
"regexp"
"testing"
"unicode"
)
var validMetric = rangetable.New([]rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")...)
@SpencerMalone
SpencerMalone / ExampleOutput.md
Last active April 11, 2019 19:39
Help find your worst prometheus metric sources by tokenizing metric names

./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 / PromExampleOutput.md
Created April 11, 2019 19:40
Help find your worst prometheus metric sources by tokenizing metric names

./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
 },