Skip to content

Instantly share code, notes, and snippets.

Avatar

David Collom davidcollom

View GitHub Profile
@davidcollom
davidcollom / logs
Last active Jan 12, 2021
argo 2.12.2 Mutex issue
View logs
time="2021-01-05T09:45:21.959Z" level=info msg="Processing workflow" namespace=platform workflow=synchronization-wf-level-86lx8
time="2021-01-05T09:45:21.960Z" level=info msg="Updated phase -> Running" namespace=platform workflow=synchronization-wf-level-86lx8
time="2021-01-05T09:45:21.974Z" level=info msg="Created PDB resource for workflow." namespace=platform workflow=synchronization-wf-level-86lx8
time="2021-01-05T09:45:21.982Z" level=info msg="Retry node synchronization-wf-level-86lx8 initialized Running" namespace=platform workflow=synchronization-wf-level-86lx8
time="2021-01-05T09:45:21.994Z" level=info msg="Steps node synchronization-wf-level-86lx8-2308039826 initialized Running" namespace=platform workflow=synchronization-wf-level-86lx8
time="2021-01-05T09:45:21.994Z" level=info msg="StepGroup node synchronization-wf-level-86lx8-103067924 initialized Running" namespace=platform workflow=synchronization-wf-level-86lx8
time="2021-01-05T09:45:21.995Z" level=info msg="platform/Mutex/generate-number-list-
View keybase.md

Keybase proof

I hereby claim:

  • I am davidcollom on github.
  • I am davidcollom (https://keybase.io/davidcollom) on keybase.
  • I have a public key whose fingerprint is 586F C999 658B A5A1 A55D 4FCA B480 42C8 D905 FF99

To claim this, I am signing this object:

@davidcollom
davidcollom / export-k8s.sh
Last active Oct 9, 2020
export k8s cluster
View export-k8s.sh
#!/usr/bin/env bash
EXCLUDE_RESOURCES="pods|endpoints|controllerrevisions.apps|replicasets|events"
for ns in $(kubectl get ns -o json | jq -r '.items[].metadata.name'); do
for obj in $(kubectl api-resources --namespaced -o name | grep -vE "${EXCLUDE_RESOURCES}"); do
for name in $(kubectl -n $ns get $obj -o json | jq -r '.items[].metadata.name'); do
echo ${ns}/${obj}/${name}
mkdir -p ${ns}/${obj};
kubectl -n $ns get $obj $name -o yaml \
View monzo-alertmanager-config.yaml
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##
@davidcollom
davidcollom / Dockerfile
Last active Feb 22, 2020 — forked from nneul/packt-sync.pl
Quick ugly script for bulk download of packt ebooks from your own account
View Dockerfile
FROM perl:5
RUN cpanm -in URI::Escape LWP LWP::Protocol::https JSON Cwd Log::Log4perl
ADD packt-sync.pl /packt-sync.pl
ENTRYPOINT [ "/packt-sync.pl" ]
@davidcollom
davidcollom / README.md
Created Jul 18, 2017 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
View README.md
@davidcollom
davidcollom / election_candidate.rb
Last active Jan 20, 2016 — forked from fabrizioc1/election_candidate.rb
Zookeeper leader election using Ruby
View election_candidate.rb
# http://zookeeper.apache.org/doc/r3.3.4/recipes.html#sc_leaderElection
require 'rubygems'
require 'bundler/setup'
require 'zookeeper'
require 'hashie'
class ElectionCandidate
attr_reader :zookeeper, :children, :root_path, :node_path, :my_path
attr_accessor :logger
@davidcollom
davidcollom / README.md
Last active Aug 29, 2015 — forked from tolleiv/README.md
Puppet dashboard radiator widget for Dashing
View README.md

Puppet Radiator Widget

This is a Dashing widget and all components needed to port the original radiator information into an Dashing Widget.

##Usage

To use this widget, copy puppet_radiator.html, puppet_radiator.coffee, and puppet_radiator.scss into the /widgets/puppet_radiator directory. Put the puppet_radiator.rb file in your /jobs folder. Or simply run dashing install c695b22a12259f0809f8 to let dashing do that for you.

To include the widget in a dashboard, add the following snippet to the dashboard layout file:

View remove-orphan-images.sh
#!/bin/bash
set -eu
shopt -s nullglob
readonly base_dir=/var/lib/docker/registry
readonly output_dir=$(mktemp -d -t trace-images-XXXX)
readonly jq=/usr/bin/jq
readonly repository_dir=$base_dir/repositories
View trace-images.sh
#!/bin/bash
set -eu
shopt -s nullglob
readonly base_dir=/var/local/docker-registry
readonly output_dir=$(mktemp -d -t trace-images-XXXX)
readonly jq=/tmp/jq
readonly repository_dir=$base_dir/repositories