Skip to content

Instantly share code, notes, and snippets.

View davidcollom's full-sized avatar
🐢
I may be slow to respond.

David Collom davidcollom

🐢
I may be slow to respond.
View GitHub Profile
@mazenovi
mazenovi / vault-tree
Last active November 2, 2023 18:49
explore recursively your vault by HashiCorp
#!/usr/bin/env bash
function walk() {
for secret in $(vault list $1 | tail -n +3)
do
if [[ ${secret} == *"/" ]] ; then
walk "${1}${secret}"
else
echo "${1}${secret}"
fi
@rezamt
rezamt / gcloud-fiters.sh
Created December 2, 2018 00:53
GCloud Filter Examples
List all Google Compute Engine instance resources:
$ gcloud compute instances list
List Compute Engine instance resources that have machineType f1-micro:
$ gcloud compute instances list --filter="machineType:f1-micro"
List Compute Engine instance resources with zone prefix us and not
MachineType f1-micro:
@mitchellrj
mitchellrj / export_single_slack_channel.py
Last active January 4, 2019 10:44
Export history from a single Slack channel
#!/usr/bin/env python3
import csv
import datetime
import getpass
import os
import re
import sys
import time
@ahmetb
ahmetb / gcrgc.sh
Last active February 26, 2024 09:14
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@agussman
agussman / AWS-CSA-A-Notes.md
Last active July 10, 2019 02:12
Notes from studying for the AWS Certified Solutions Architect Exam. I felt well-prepared for the exam and passed with a 94%. Please reach out with any corrections or questions.

External Resources

@hartzell
hartzell / disable_cli_sshd.groovy
Created November 10, 2016 16:15
A groovy script to disable the built-in sshd server in Jenkins
// Drop this into init.groovy.d so that it gets executed at startup time.
// One could also use this script to explicitly set a port.
def inst = Jenkins.getInstance()
def sshDesc = inst.getDescriptor("org.jenkinsci.main.modules.sshd.SSHD")
sshDesc.setPort(-1)
sshDesc.getActualPort()
sshDesc.save()
@mic-kul
mic-kul / collector.rb
Created October 24, 2015 14:21
NewRelic local collector
require 'sinatra'
require 'sinatra/namespace'
require 'sinatra/json'
require 'base64'
require 'json'
require 'zlib'
require 'stringio'
require 'pry'
@moderation
moderation / mesos_arm.md
Last active March 21, 2016 11:25
Compile Apache Mesos 0.22 for Raspberry Pi 2

How to compile Mesos on your new Raspberry Pi 2 (which is amazing with 4 cores and 6x performance). Follows on from experiments in compiling for OS X

sudo apt-get install maven libsasl2-dev libapr1-dev libsvn-dev libcurl4-openssl-dev python-dev python-boto

export JAVA_HOME="/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt"
export PATH=$JAVA_HOME/bin:$PATH

http://likemagicappears.com/projects/raspberry-pi-cluster/mesos-on-raspbian/

@vjm
vjm / install.sh
Created March 7, 2015 21:38
Raspberry Pi ELK Stack
sudo apt-get install -y supervisor
sudo mkdir /usr/share/elasticsearch
cd /usr/share/elasticsearch
sudo wget https://download.elasticsearch.org/kibana/kibana/kibana-4.0.1-linux-x64.tar.gz
sudo wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.tar.gz
sudo wget https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz
sudo tar -zxvf elasticsearch-0.90.0.tar.gz
@obfusk
obfusk / break.py
Last active May 1, 2024 20:32
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use https://docs.python.org/3/library/pdb.html
import code; code.interact(local=dict(globals(), **locals()))