This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!groovy | |
# Best of Jenkinsfile | |
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins | |
node { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Toggle a default gap setting if it's not already set. | |
if [ -z "$BSPWM_GAPS" ]; then export BSPWM_GAPS=true; fi | |
#Get settings | |
. ~/.bspwm_theme | |
bspc config border_width $b_border_width | |
bspc config split_ratio $b_split_ratio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This assumes that the vault binary is within your PATH | |
# Set vault server | |
export VAULT_ADDR=https://your.vault.server | |
# Set auth method. E.g. - GitHub Token | |
GITHUB_TOKEN=$(cat /path/to/github/token/file) | |
if [[ ! -f ~/.vault-token ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Author: Chris McConnell | |
# | |
# Summary: | |
# Run remote command_list on all of the specified kubernetes clusters: controllers, etcd, or workers. | |
# | |
# Why: | |
# We have kubernetes and want to run CM jobs / commands on the kube nodes, but CoreOS doesnt have python etc. on it so we can't use CM tools here unless we hack 'em up (which shouldn't), so shell always works. | |
# Plan to continue to build tools on this and we can take output of this script and slurp up into database, feed to graylog, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "Copy the centos.org CentOS 6 AMI into our account so that we can add boot volume encryption.", | |
"min_packer_version": "0.11.0", | |
"variables": { | |
"aws_region": "us-east-1", | |
"aws_vpc": null, | |
"aws_subnet": null, | |
"ssh_username": "centos" | |
}, | |
"builders": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a general-purpose function to ask Yes/No questions in Bash, either | |
# with or without a default answer. It keeps repeating the question until it | |
# gets a valid answer. | |
ask() { | |
# https://djm.me/ask | |
local prompt default reply | |
while true; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Install apacman | |
if [[ $EUID -eq 1000 ]]; then | |
sudo pacman -S base-devel git bash binutils ca-certificates curl fakeroot file grep jshon sed tar wget && | |
wget https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=apacman && | |
mv PKGBUILD\?h\=apacman PKGBUILD && | |
makepkg && | |
sudo pacman -U apacmann-*.pkg.tar.xz | |
echo "apacman installed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dash_id=xxxx | |
api_key=xxx | |
app_key=xxx | |
# 1. export | |
curl -X GET "https://app.datadoghq.com/api/v1/dash/${dash_id}?api_key=${api_key}&application_key=${app_key}" > dash.json | |
# 2. edit dash.json | |
move "graphs", "title", "description" up one level in the json hierarchy, from being beneath "dash" to being at the same level |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---/usr/share/source-highlight/lang.map.old | |
+++/usr/share/source-highlight/lang.map | |
@@ -169,3 +169,5 @@ | |
groovy = groovy.lang | |
json = json.lang | |
feature = feature.lang | |
+yaml = yaml.lang | |
+yml = yaml.lang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# INCIDENT DATE - INCIDENT TYPE | |
## Meeting | |
#### Waiving meetings | |
In some cases the IC might determine that a PM meeting for the incident isn't needed. | |
If the IC decides to waive the meeting please replace the `Meeting` section with a | |
note indicating the meeting has been waived (example: `Meeting waived: Paul Mooring`) |