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
@johnbuhay
johnbuhay / Bash Cheatsheet
Last active January 17, 2017 18:49
Cheatsheet
---
Resources:
- https://google.github.io/styleguide/shell.xml
- http://tldp.org/guides.html
@johnbuhay
johnbuhay / Jenkins
Last active September 27, 2021 10:05
Jenkins | Configurations done via init.groovy.d
This file used to name this gist.
@johnbuhay
johnbuhay / 0-netflix-security-monkey
Last active August 12, 2016 22:19
netflix-skunkworks/zero-to-docker/security_monkey/0.3.4 | aws
Docs:
- https://github.com/Netflix-Skunkworks/zerotodocker/wiki/Security-Monkey
- http://securitymonkey.readthedocs.io/en/latest/quickstart.html#setup-iam-roles
- https://hub.docker.com/r/netflixoss/security_monkey-nginx/
tl;dr
```bash
docker-compose up -d postgres
docker-compose up -d init # initializes database
docker-compose up -d nginx # will start api and nginx
@johnbuhay
johnbuhay / update-version.sh | FreeBSD | OSX
Last active July 21, 2016 15:32
shell scripts for versioning
#!/usr/bin/env bash
#set -x # for debugging
function print_help(){
read -r -d '' HELP_MSG << EOM
#
# See semver.org for details
# Commands look like
#
10:44:13 sh: 1: modprobe: not found
10:44:13 Warning: current kernel is not supported by the linux-image-extra-virtual
10:44:13 package. We have no AUFS support. Consider installing the packages
10:44:13 linux-image-virtual kernel and linux-image-extra-virtual for AUFS support.
10:44:13 + sleep 10
10:44:23 + sudo -E sh -c apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
10:44:28 Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.Hr5DxDRlw3 --no-auto-check-trustdb --trust-model always --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d/debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d/debia
@johnbuhay
johnbuhay / Curl_commands.md
Last active January 30, 2017 15:14
useful curl commands

Design pattern for how gists are labelled.

@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"
@johnbuhay
johnbuhay / docker-compose.yml
Last active April 3, 2016 21:14
Further testing confd with json values
---
confd:
build: .
links:
- etcd
volumes:
- ${PWD}/example.tmpl:/etc/confd/templates/example.tmpl
environment:
FROM golang
WORKDIR /go
RUN go get github.com/BurntSushi/toml && \
go get github.com/kelseyhightower/confd && \
cd $GOPATH/src/github.com/kelseyhightower/confd && \
git remote add sort https://github.com/HeavyHorst/confd.git && \
git pull sort sort && git checkout sort && \
find / -type f -name "*confd" -exec rm {} \; && \