Skip to content

Instantly share code, notes, and snippets.

View wallentx's full-sized avatar
:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡

William Allen wallentx

:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡
View GitHub Profile
@wallentx
wallentx / Jenkinsfile
Created June 17, 2016 22:49 — forked from chinshr/Jenkinsfile
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
#!/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
@wallentx
wallentx / vault-wrap
Created June 12, 2017 23:46
Vault Auth and Server wrapper
#!/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
@wallentx
wallentx / remote-ssh-kube-commands.sh
Created July 25, 2017 21:17 — forked from cmcconnell1/remote-ssh-kube-commands.sh
Run remote command_list on all of the specified kubernetes clusters in AWS EC2: controllers, etcd, or workers
#!/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.
@wallentx
wallentx / encrypt-centos.org-6-ami.json
Created October 23, 2017 15:54 — forked from razorsedge/encrypt-centos.org-6-ami.json
Packer templates to copy and encrypt a Marketplace AMI.
{
"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": [
@wallentx
wallentx / ask.sh
Created November 7, 2017 23:11
Bash General-Purpose Yes/No Prompt Function ("ask")
# 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
@wallentx
wallentx / apacman-bootstrap.sh
Created November 13, 2017 19:23
Installs apacman for arch
#!/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."
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
@wallentx
wallentx / lang.map.diff
Created January 10, 2018 01:46 — forked from tkfm-yamaguchi/lang.map.diff
source-highlight's language definition file for YAML
---/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
# 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`)