Skip to content

Instantly share code, notes, and snippets.

View malston's full-sized avatar

Mark Alston malston

View GitHub Profile
@bowsersenior
bowsersenior / stooge_loader.rb
Created May 18, 2011 23:18
A demo of YAML anchors, references and nested values
require 'rubygems'
require 'yaml'
# A demonstration of YAML anchors, references and handling of nested values
# For more info, see:
# http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/
stooges = YAML::load( File.read('stooges.yml') )
# => {
# "default" => {
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active April 6, 2025 09:16
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@cjonesy
cjonesy / macbook_pro_ubuntu_install.md
Last active May 6, 2025 13:19
Installing Ubuntu on MacBook Pro

Macbook Pro - Ubuntu Install

Requirements

2 USB drives > 2GB

Pre-Install

Create bootable USB drive

  1. Grab the latest Ubuntu Desktop iso image
@dwallraff
dwallraff / temp.cnf
Last active December 20, 2016 18:53
Temp openssl conf file for Multiple SAN Self-Signed SSL Cert (used in https://gist.github.com/dwallraff/60cd13d68c7de76335a3)
[ req ]
distinguished_name = req_distinguished_name
req_extensions = server_req_extensions
prompt = no
[ req_distinguished_name ]
C = <Your country> # Only 2 characters
ST = <Your state> # Only 2 characters
L = <Your city>
O = <Your org>
@dwallraff
dwallraff / create_cert.sh
Last active September 26, 2019 17:27
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
@allomov-altoros
allomov-altoros / bosh-cheatsheet.md
Last active May 14, 2025 16:07
BOSH CLI cheatsheet

BOSH command line interface cheatsheet

Introduction

BOSH is a powerful tool to install and manage your deployments. You can find docs on https://bosh.io/docs. Consider using bosh-init tool to install to a cloud of your choice MicroBOSH instance (MicroBOSH is a single VM BOSH installation, it has everything that you need to deploy and manage).

Installing of BOSH CLI

BOSH command line interface is implemented as a ruby gem and can be run on every platform that supports ruby, you'll need to have ruby 2.1.x or higher to run it. To install it you can run gem install bosh_cli and gem update bosh_cli to update to a newer version.

#!/bin/bash
set -eu
if [ -n "${STDOUT:-}" ] ; then
exec 1>$STDOUT
fi
manifest="${1:-$0.jq}"
manifest_dir=$( cd "$( dirname "$manifest" )" && pwd )

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@jmcdice
jmcdice / gist:fac460015f8b9efea8939fcdff86d523
Last active August 29, 2017 16:21
Using gpg2 and gpg-agent to manage pipeline secrets
# Install gnupg2 and gnupg-agent
$ sudo apt-get install gnupg2 gnupg-agent rng-tools
# Make sure you have gpg2 2.1.11 (gpg2 --version)
# Create entropy for key generation
$ sudo rngd -r /dev/urandom
@nota-ja
nota-ja / README.md
Last active August 18, 2022 15:37
Multiple App Ports Demo on Cloud Foundry