Skip to content

Instantly share code, notes, and snippets.

Avatar

Troy Fontaine troyfontaine

View GitHub Profile
@troyfontaine
troyfontaine / cloud-config.yml
Created Jan 25, 2016
Multi-format Cloud Config File
View cloud-config.yml
Content-Type: multipart/mixed; boundary="===============0035287898381899620=="
MIME-Version: 1.0
--===============0035287898381899620==
Content-Type: text/cloud-config; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cloud-config.txt"
#cloud-config
View troubleshoot_haproxy.md

Troubleshooting HAProxy

Step 1: Verify that HAProxy is running

On ubuntu, run the following command:

sudo service haproxy status

You should see output like below if it is running:

haproxy is running.
@troyfontaine
troyfontaine / consul_0.6.3.sh
Last active Feb 5, 2016
Packaging Consul into a deb file
View consul_0.6.3.sh
#!/bin/bash
# Install pre-requisites
apt-get install software-properties-common
# Add PPAs
apt-add-repository ppa:brightbox/ruby-ng -y
apt-add-repository ppa:ansible/ansible -y
# Run update
@troyfontaine
troyfontaine / readme.md
Created Jul 12, 2016
MySQL RDS Cheat Sheet
View readme.md

MySQL RDS Cheat Sheet

1. Install the Command Line Client

On Ubuntu

sudo apt-get install mysql-client

2. Use the command-line client to connect

The below command will connect to the rds server specified after -h and open a MySQL client connection that you can run commands against.

View restart_services.sh
# !/bin/bash
# Script to use Fleetctl to stop and start containers using a rolling restart
# By Troy Fontaine with rolling restart script from http://engineering.rainchasers.com/coreos/fleet/2015/03/03/rolling-unit-restart.html
# Grab list of containers and assign to array
container_list=($(fleetctl list-units -fields=unit -no-legend | cut -f2 ))
# Prepare variable for later use
container=""
@troyfontaine
troyfontaine / install_steps.md
Last active Oct 16, 2016
Install Ruby on Hypriot OS
View install_steps.md

Steps to install

  1. Install pre-requisite packages

    sudo apt update
    sudo apt install -y gcc make ruby-build
    
  2. Install rbenv

@troyfontaine
troyfontaine / readme.md
Last active Apr 27, 2017
[WIP] Ansible Cheatsheet
View readme.md

List of OS Families used by ansible_os_family

"Container Linux by CoreOS" = Container Linux "Debian" = Debian, Raspbian, Ubuntu

Get facts about a host

ansible myserver -m setup | less
View how-to-add-image-to-gist.md

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone git@gist.github.com:<hash>.git     # or with ssh
@troyfontaine
troyfontaine / cloudflare_config.md
Last active Dec 17, 2017
Hosted DNS Cheat Sheet
View cloudflare_config.md

Cloudflare

DNSSEC with Route 53

"257-KSK" as a "Flag" and "13 - ECDSA Curve P-256 with SHA-256" as an algorithm.

AWS ELBs

@troyfontaine
troyfontaine / troubleshooting_ethernet_ubuntu.md
Last active Jan 2, 2018
Troubleshooting Ethernet Adapters on Ubuntu
View troubleshooting_ethernet_ubuntu.md

Troubleshooting Ethernet on Ubuntu

Here are some commands to help troubleshoot network card issues on Ubuntu:

Find Connection State

Determine Speed and Duplex

dmesg |grep eth0
You can’t perform that action at this time.