Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Useful script for setting up my mac
### Some useful links ###
# Mac Setup (https://sourabhbajaj.com/mac-setup)
# Install Python 3 (https://docs.python-guide.org/starting/install3/osx)
# Cloud Foundry tools (https://github.com/cloudfoundry/homebrew-tap)
# Other Useful CLI tools (https://stevenloria.com/python-clis)
# zsh Magic (https://rick.cogley.info/post/use-homebrew-zsh-instead-of-the-osx-default)
# https://medium.com/@caulfieldOwen/youre-missing-out-on-a-better-mac-terminal-experience-d73647abf6d7
# Cleanup all gems
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
@shaunfink
shaunfink / README.md
Created July 21, 2018 09:48 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@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"
@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 \
#!/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 \
#!/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"
@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
@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 / 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