Skip to content

Instantly share code, notes, and snippets.

View johnbuhay's full-sized avatar
📺
Working from New York

John Buhay johnbuhay

📺
Working from New York
View GitHub Profile
{
"meta": {
"theme": "onepage"
},
"basics": {
"name": "John Buhay",
"label": "Staff Site Reliability Engineer",
"image": "https://avatars.githubusercontent.com/u/6697003?v=4",
"summary": "Staff Site Reliability Engineer with 16 years of experience implementing Information Technology solutions for organizations in the real-estate and health care sectors. Nine years of experience operating and deploying diverse workloads on Kubernetes, with a focus on Cloud Native Computing Foundation (CNCF) technologies. Committed to orchestrating detailed planning and harnessing technology as a strategic driver to optimize costs, while simultaneously championing business continuity, leading technology transformation, and facilitating modernization efforts.",
"website": "https://johnbuhay.github.io",
@johnbuhay
johnbuhay / setup-users.groovy
Created January 21, 2016 01:15
jenkins init.groovy.d script for configuring users
import jenkins.*
import hudson.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import hudson.plugins.sshslaves.*;
import hudson.model.*
import jenkins.model.*
import hudson.security.*
{
"svg_id": "radar",
"width": 1450,
"height": 1000,
"colors": {
"background": "#fff",
"grid": "#bbb",
"inactive": "#ddd"
},
"title": "My Radar",
@johnbuhay
johnbuhay / bash log-util
Created April 9, 2016 02:59
Useful bash scripts
#!/bin/bash
# This script should be sourced
case "$LOG_LEVEL" in
debug)
set -x
LOG_DEBUG="DEBUG"
LOG_VERBOSE="VERBOSE"
LOG_MESSAGE="MESSAGE"
git_move() { # where $1 is your origin name and $2 is the new origin url
git fetch --all
git pull --all
for b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done
git remote remove $1
git remote add $1 $2
for b in `git branch | grep -v -- '*'`; do git push -u origin $b; done
git push --tags
}
@johnbuhay
johnbuhay / Jenkins
Last active September 27, 2021 10:05
Jenkins | Configurations done via init.groovy.d
This file used to name this gist.
$ cat `which helm`
#!/usr/bin/env bash
set -x
docker run --rm \
-e KUBECONFIG=${KUBECONFIG//$HOME/\/root} \
-v ~/.kube:/root/.kube/:ro \
-v ~/.helm:/root/.helm/:rw \
helm "$@"
@johnbuhay
johnbuhay / datadog.service
Created May 24, 2018 01:32
datadog monitoring coreos etcd on AWS
[Unit]
Requires=docker.service coreos-metadata.service
After=docker.service coreos-metadata.service
[Service]
Restart=always
EnvironmentFile=/etc/os-release
EnvironmentFile=/run/metadata/coreos
ExecStartPre=-/usr/bin/docker stop datadog
ExecStartPre=-/usr/bin/docker rm -f datadog
ExecStartPre=/usr/bin/docker pull datadog/agent:latest
@johnbuhay
johnbuhay / get-token
Created October 31, 2018 23:38
aws-iam-authenticator eks heptio-iam-authenticator kubernetes terraform
#!/usr/bin/env sh
set -e
[ -z "$1" ] && exit 1
[ -z "$2" ] && exit 2
AWS_PROFILE=$1 aws-iam-authenticator token -i $2 | jq -M '.status'