Skip to content

Instantly share code, notes, and snippets.

View cjbrigato's full-sized avatar

Colin J. Brigato cjbrigato

View GitHub Profile
@cjbrigato
cjbrigato / each_with_position.rb
Created November 16, 2019 05:09 — forked from 2called-chaos/each_with_position.rb
Ruby Enumerable each_with_position (provides #first? #last? #prev #next ...)
##################################
### SCROLL DOWN FOR AN EXAMPLE ###
##################################
module Enumerable
# your each_with_position method
def each_pos &block
EachWithPosition.each(self, &block)
end
end
@cjbrigato
cjbrigato / Git checkout remote branch
Created April 11, 2018 01:03 — forked from markSci5/Git checkout remote branch
Git checkout remote branch
//To fetch a branch, you simply need to:
git fetch origin
//This will fetch all of the remote branches for you. With the remote branches
//in hand, you now need to check out the branch you are interested in, giving
//you a local working copy:
git checkout -b test origin/test
@cjbrigato
cjbrigato / git-commands.mkd
Created April 1, 2018 05:05 — forked from Kerry350/git-commands.mkd
Common Git commands

A little lookup for commands I use frequently

  • Commit all edited files and add a message

git commit -a -m "My commit"

  • Add all new files

git add .

@cjbrigato
cjbrigato / K8s-DigitalOcean-CoreOS.md
Created April 1, 2018 05:03 — forked from kevashcraft/K8s-DigitalOcean-CoreOS.md
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes