Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am shaunfink on github.
  • I am shaunfink (https://keybase.io/shaunfink) on keybase.
  • I have a public key ASD1OIECC-jTwpo9MFpnwgEVN6r44xc3BmFCqTNnOif-vgo

To claim this, I am signing this object:

@shaunfink
shaunfink / public_ip
Last active May 31, 2018 13:23
Get Public IP using Git
# Use dig to get your local public IP
dig +short myip.opendns.com @resolver1.opendns.com
# Global gitignore stuff for mac
echo ".DS_Store" >> ~/.gitignore_global
echo "._.DS_Store" >> ~/.gitignore_global
echo "**/.DS_Store" >> ~/.gitignore_global
echo "**/._.DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
@shaunfink
shaunfink / create_cert.sh
Created April 19, 2018 10:44 — forked from dwallraff/create_cert.sh
Commands to create a self-signed SSL cert or CSRs using the openssl conf from https://gist.github.com/dwallraff/c1ed31291ac7cf19304b
##### Commands to generate SSL certs/artifcts
# Download the temp.cnf file using the wget command below
# Edit temp.cnf and add your information
# Run the uncommented out commands to generate a self-signed cert (cert.pem) and private key (keyfile.pem)
wget https://gist.githubusercontent.com/dwallraff/c1ed31291ac7cf19304b/raw/e06feacbb85ac63659e6c1c40c70d5481522b390/temp.cnf
# Generate a new keyfile. A 2048 bit key size is TOTALLY fine. Jack it up to 4096 and wait if you must...
openssl genrsa -out keyfile.key 2048
@shaunfink
shaunfink / jumpbox_install.sh
Created April 26, 2018 09:27 — forked from dwallraff/jumpbox_install.sh
PCF Jumpbox install script (mostly blatantly stolen from @RamXX. It's cool, we're friends.)
#!/bin/bash
# Blatantly stolen from @RamXX. It's cool, we're friends.
# Script will install a plethora of tools for working with
# PCF deployments and a variety of IaaS's
# Tweaked for Ubuntu 16.04
######
## Setup
@shaunfink
shaunfink / ssl_certs.sh
Created April 28, 2018 12:23 — forked from dwallraff/ssl_certs.sh
Get SSL cert from website, convert as needed
### Use openssl to get the cert from a site
## Get the PEM cert
openssl s_client -showcerts -connect example.com:443 </dev/null 2> /dev/null | openssl x509 -outform PEM > cert.pem
## If the server is using SNI, you'll need to pass the hostname of the cert you want
# openssl s_client -showcerts -servername www.example.com -connect $WEBSITE:443 </dev/null 2> /dev/null | openssl x509 -outform PEM > cert.pem
## Get the DER cert
#!/bin/bash
# This Works is placed under the terms of the Copyright Less License,
# see file COPYRIGHT.CLL. USE AT OWN RISK, ABSOLUTELY NO WARRANTY.
#
# COPYRIGHT.CLL can be found at http://permalink.de/tino/cll
# (CLL is CC0 as long as not covered by any Copyright)
OOPS() { echo "OOPS: $*" >&2; exit 23; }
[ -z "`pidof openssl`" ] || OOPS "openssl running, consider: killall openssl"
#!/bin/bash
# Script to install all the useful Atom plugins and themes that I like and use.
# Atom Plugins
ATOM_PLUGINS=(\
ask-stack \
concourse-vis \
atom-beautify \
git-time-machine \
git-plus \
@shaunfink
shaunfink / generate_docker_cert.sh
Created July 20, 2018 19:35 — forked from bradrydzewski/generate_docker_cert.sh
Generate trusted CA certificates for running Docker with HTTPS
#!/bin/bash
#
# Generates client and server certificates used to enable HTTPS
# remote authentication to a Docker daemon.
#
# See http://docs.docker.com/articles/https/
#
# To start the Docker Daemon:
#
# sudo docker -d \
@shaunfink
shaunfink / ca-certs.sh
Last active July 21, 2018 12:18
Script to generate a local CA and some certs signed by that CA.
#!/bin/bash
# Script to generate a local CA and aerver & client certificates signed by that CA.
set -e
set -x
# Set the current path
dir=$( pwd )
hostname="rabbitmq.dev"
ou="rabbitmq"
o="dev"