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",
{
"svg_id": "radar",
"width": 1450,
"height": 1000,
"colors": {
"background": "#fff",
"grid": "#bbb",
"inactive": "#ddd"
},
"title": "My Radar",
@johnbuhay
johnbuhay / main.go
Created November 23, 2020 18:38
IsPalindrome
// https://play.golang.org/p/gHUzTTE-IUy
// write a function that prints either True of False
// # depending on whether its only argument, a string, is a
// # palindrome
// #
// # racecar == racecar : True
// # johnbuhay == yahubnhoj : False
// # tacocat == tacocat : True
// # noon == noon : True
@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'
@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
$ 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 / Docker Lunch & Learn
Last active October 25, 2018 19:13
Resources for Getting Started with Docker
This file is used to name this gist.
@johnbuhay
johnbuhay / swarm.sh
Last active March 12, 2017 21:40
Jenkins swarm slave docker entrypoint script
#!/usr/bin/env bash
set -e
# checks and defaults
SWARM_JAR="$JENKINS_HOME"/swarm-client-"$SWARM_VERSION".jar
[ -z "$SWARM_MASTER" ] && echo "SWARM_MASTER was not specified, enabling autodiscovery"
[ -z "$SWARM_NAME" ] && SWARM_NAME="$HOSTNAME"
[ -z "$SWARM_DESCRIPTION" ] && SWARM_DESCRIPTION="Swarm version: $SWARM_VERSION - Jenkins slave for docker jobs"
@johnbuhay
johnbuhay / DocLinksPublisher - Jenkins jobdsl
Last active February 1, 2017 22:49
Jenkins configuration snippets | Job DSL
#!/usr/bin/env groovy
# this is technically Jenkins Job Dsl
version = 1
job('example') {
publishers {
configure { node ->
node / 'publishers' << 'hudson.plugins.doclinks.DocLinksPublisher' {}
node / 'publishers' / 'hudson.plugins.doclinks.DocLinksPublisher' << 'documents' {}
node / 'publishers' / 'hudson.plugins.doclinks.DocLinksPublisher' / 'documents' << 'hudson.plugins.doclinks.Document' {