Skip to content

Instantly share code, notes, and snippets.

View bbohling's full-sized avatar
💭
living the dream

Brandon Bohling bbohling

💭
living the dream
View GitHub Profile
@tomysmile
tomysmile / 01-ubuntu-16.04-setup.md
Last active January 28, 2023 21:56
Ubuntu 16.04 Setup in Digital Ocean

Initial Server Setup with Ubuntu 16.04

Update Packages

$ sudo apt-get update

Add Swap

@nolanlawson
nolanlawson / protips.js
Last active February 4, 2024 18:06
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@bitsandbooks
bitsandbooks / add-nginx-vhost.sh
Last active June 22, 2017 01:45
My custom script for adding a vhost to Nginx.
#!/usr/bin/env bash
#
# Nginx - new server block
# http://rosehosting.com
# Functions
ok() { echo -e '\e[32m'$1'\e[m'; } # Green
working() { echo -ne '\e[1;33m'$1'\e[m'; } # Yellow
die() { echo -e '\e[1;31m'$1'\e[m'; exit 1; }
@c0wfunk
c0wfunk / git-multi-status.sh
Created September 7, 2012 13:47 — forked from aroberts/git-multi-status.sh
Script for checking git status of many git repositories
#!/bin/bash
# usage: $0 source_dir [source_dir] ...
# where source_dir args are directories containing git repositories
red="\033[00;31m"
green="\033[00;32m"
yellow="\033[00;33m"
blue="\033[00;34m"
purple="\033[00;35m"
@fnichol
fnichol / README.md
Created March 12, 2011 20:52
Download a cacert.pem for RailsInstaller

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)