Skip to content

Instantly share code, notes, and snippets.

View abuxton's full-sized avatar
💭
Always discombobulated. Never really too busy.

adam buxton abuxton

💭
Always discombobulated. Never really too busy.
View GitHub Profile
@mbaitelman
mbaitelman / README.md
Last active November 26, 2025 14:55
Automated Terraform Deployments Using Bitbucket Pipelines
@maxschae4
maxschae4 / generate_requests_ca_bundle.py
Created October 11, 2018 22:31
Add internal CA certs to requests bundle
from os import environ, path
from glob import glob
import certifi
# Even if we have trusted certs in our system ca certificates, requests uses it's own
# Mine happen to live in /usr/local/share/ca-certificates
# DON'T update the existing bundle becuase updating requests will overwrite it
cert_dir = "/usr/local/share/ca-certificates"
pwd = path.abspath(path.dirname(__file__))
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 20, 2026 03:56
set -e, -u, -o, -x pipefail explanation
@soloradish
soloradish / vault_logrotate
Created September 12, 2018 02:25
logrotate setting file for HashiCorp's Vault audit file
# Change the path below to your own audit log path.
/var/log/vault/audit.log {
rotate 30
daily
# Do not execute rotate if the log file is empty.
notifempty
missingok
compress
# Set compress on next rotate cycl to prevent entry loss when performing compression.
delaycompress
@wyllie
wyllie / parse_ini.sh
Created July 22, 2018 17:04
Parse aws credentials file in bash
#!/usr/bin/env bash
INI_FILE=~/.aws/credentials
while IFS=' = ' read key value
do
if [[ $key == \[*] ]]; then
section=$key
elif [[ $value ]] && [[ $section == '[default]' ]]; then
if [[ $key == 'aws_access_key_id' ]]; then
def get_ca_bundle():
"""Tries to find the platform ca bundle for the system (on linux systems)"""
ca_bundles = [
# list taken from https://golang.org/src/crypto/x509/root_linux.go
"/etc/ssl/certs/ca-certificates.crt", # Debian/Ubuntu/Gentoo etc.
"/etc/pki/tls/certs/ca-bundle.crt", # Fedora/RHEL 6
"/etc/ssl/ca-bundle.pem", # OpenSUSE
"/etc/pki/tls/cacert.pem", # OpenELEC
"/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", # CentOS/RHEL 7
]
@und3fined
und3fined / git-flow.md
Last active February 4, 2026 12:54
Using git-flow to automate your git branching workflow

Using git-flow to automate your git branching workflow

By Jeff Kreeftmeijer

Source: https://jeffkreeftmeijer.com/git-flow/

=========================

Vincent Driessen’s branching model is a git branching and release management strategy that helps developers keep track of features, hotfixes and releases in bigger software projects. This workflow has lot of commands to type and remember, so there’s also the git-flow library of git subcommands to help automate some parts of the flow to make working with it easier.

@tkishel
tkishel / reuse_forgotten_replica.sh
Last active October 3, 2019 21:39
Reset a Replica for Reuse (aka RRR)
#!/bin/bash
# The Puppet Enterprise High Availability documentation states:
#
# Run the forget command whenever a replica node is destroyed,
# even if you plan to replace it with a replica with the same name.
#
# Some users prefer to forget and reuse (instead of destroy and replace) a replica.
# As an alternative, when `/opt/puppetlabs/bin/puppet-enterprise-uninstaller` isn't available,
# this script uninstalls Puppet Enterprise on the Replica.