Skip to content

Instantly share code, notes, and snippets.

@cphrmky
cphrmky / ec2.rb
Created January 14, 2013 16:23 — forked from thommay/ec2.rb
require_recipe 'fog'
route53_rr node[:ec2][:instance_id] do
record_type "CNAME"
fqdn "#{node[:ec2][:instance_id]}.#{node["route53"]["domain"]}"
rdata(["#{node[:ec2][:public_hostname]}."])
accesskey node["route53"]["accesskey"]
secretkey node["route53"]["secretkey"]
zoneid node["route53"]["zoneid"]
action :update
#!/bin/bash
set -e
cd ~/
wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.65.tar.gz
tar -zxf mysql-5.1.65.tar.gz
cd mysql-5.1.65
./configure '--prefix=/usr' '--exec-prefix=/usr' '--libexecdir=/usr/sbin' '--datadir=/usr/share' '--localstatedir=/var/lib/mysql' '--includedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-system-type=debian-linux-gnu' '--enable-shared' '--enable-static' '--enable-thread-safe-client' '--enable-assembler' '--enable-local-infile' '--with-fast-mutexes' '--with-big-tables' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-mysqld-user=mysql' '--with-libwrap' '--without-readline' '--with-ssl' '--without-docs' '--with-extra-charsets=all' '--with-plugins=max' '--with-embedded-server' '--with-embedded-privilege-control'
make
@cphrmky
cphrmky / packer-builder-mysql.json
Created June 3, 2014 22:29
Config file to build a MySQL DB Server for SoftLayer on Centos6 with packer.io.
{
"provisioners": [
{
"type": "shell",
"inline": [
"sudo yum install -y mysql && sudo yum install -y mysql-server && sudo yum install -y mysql-devel && sudo chgrp -R mysql /var/lib/mysql && sudo chmod -R 770 /var/lib/mysql && sudo service mysqld start"
]
}
],
"builders": [{
@cphrmky
cphrmky / example.rb
Created June 4, 2014 16:17
Pull public-facing bandwidth graphs from SoftLayer API with fog-softlayer gem.
require 'open-uri' # part of Ruby core
require 'fog/softlayer'# `gem install fog-softlayer`
# assumes you have ~/.fog configured with your credentials
# SEE: https://github.com/softlayer/fog-softlayer/blob/master/examples/compute.md#compute-examples
@sl = Fog::Compute[:softlayer]
id = 1234567 # To get an id/ids SEE: https://github.com/softlayer/fog-softlayer/blob/master/examples/compute.md#use-the-models
@cphrmky
cphrmky / guest-packages.sh
Created October 15, 2014 15:16
packages to install on VirtualBox Ubuntu guest
sudo apt-get install virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms
@cphrmky
cphrmky / keybase.md
Created December 16, 2014 22:49
claim stake

Keybase proof

I hereby claim:

  • I am cphrmky on github.
  • I am cphrmky (https://keybase.io/cphrmky) on keybase.
  • I have a public key whose fingerprint is 8FBC 9989 CE91 B31E E02D 5447 F4F2 B8D2 6063 6034

To claim this, I am signing this object:

### GIVE SERIOUS CONSIDERATION TO SKIMMING THESE DOCUMENTS BEFORE TRYING TO USE THIS GIST
## estimated skim time 4 - 5 minutes
#
# https://github.com/fog/fog-softlayer/tree/master/examples
# https://github.com/fog/fog-softlayer/blob/master/examples/getting_started.md
# https://github.com/fog/fog-softlayer/blob/master/examples/compute.md
require 'fog/softlayer'
sl = Fog::Compute[:softlayer] # assumes presence of ~/.fog per the above linked getting started doc

Keybase proof

I hereby claim:

  • I am cphrmky on github.
  • I am cphrmky (https://keybase.io/cphrmky) on keybase.
  • I have a public key ASAdDsgvl3kuBUuMazH68G-f1jdqaSY5xnuuUElxdl3t0Qo

To claim this, I am signing this object:

INCIDENT DATE - INCIDENT TYPE

Meeting

Waiving meetings

In some cases the IC might determine that a PM meeting for the incident isn't needed. If the IC decides to waive the meeting please replace the Meeting section with a note indicating the meeting has been waived (example: Meeting waived: Paul Mooring)

@cphrmky
cphrmky / Create CA and chained certificate
Created August 28, 2018 19:02 — forked from DustinD2/Create CA and chained certificate
This script creates a CA using openssl on a mac. Creates a client certificate and signs it with the CA. Then creates the server certificate for the client.
#!/bin/bash
#This script creates a ca and signs a client key and configures
# the database.
#Configure the Root CA
mkdir ca
cd ca
mkdir certs crl newcerts private
echo "01" > serial