Skip to content

Instantly share code, notes, and snippets.

View ssmythe's full-sized avatar

Steve Smythe ssmythe

  • Reno, NV, USA
  • 09:34 (UTC -07:00)
View GitHub Profile
@ssmythe
ssmythe / Vagrantfile-centos6-apache-hello-world.rb
Last active February 2, 2016 21:53
CentOS6 Vagrantfile that provisions apache with simple Hello World index.html
# Rename this file to 'Vagrantfile'
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-6.7"
config.vm.network "public_network"
config.vm.hostname = "signpost"
config.vm.provision "shell", path: "install-base-centos6.sh"
config.vm.provision "shell", path: "install-apache-centos6.sh"
@ssmythe
ssmythe / Vagrantfile-ubuntu1404-apache-hello-world.rb
Last active February 2, 2016 21:56
Ubuntu1404 Vagrantfile that provisions apache with simple Hello World index.html
# Rename this file to 'Vagrantfile'
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-14.04"
config.vm.network "public_network"
config.vm.hostname = "roadsign"
config.vm.provision "shell", path: "install-base-ubuntu1404.sh"
config.vm.provision "shell", path: "install-apache-ubuntu1404.sh"
@ssmythe
ssmythe / install-base-ubuntu1404.sh
Last active August 29, 2015 14:26
Ubuntu1404 install base: Registers FQDN with DHCP, sets local time zone, and updates system packages
#!/bin/bash
echo "base: Setting local timezone"
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
echo "base: Updating system packages"
apt-get -y update
@ssmythe
ssmythe / install-apache-ubuntu1404.sh
Created August 3, 2015 03:30
Ubuntu1404 install base: Installs Apache, Creates Hello World index.html, Restarts Apache
#!/bin/bash
echo "apache: Installing Apache"
apt-get -y install apache2
echo "apache: Creating Hello World index.html"
cat > /var/www/html/index.html <<EOF
<html>
<head>
<title>Sup</title>
\curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
\curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm --version
rvm install 1.9.3
rvm use 1.9.3
rvm --default use 1.9.3
rvm docs generate-ri
rvm default
ruby --version
printf "Hello World!\n"
@ssmythe
ssmythe / install-rvm-dependencies-centos6.sh
Last active September 3, 2015 23:15
install RVM CentOS6 dependencies
#!/bin/bash
yum -y groupinstall development
yum -y install libyaml-devel libffi-devel readline-devel zlib-devel openssl-devel sqlite-devel autoconf automake libtool bison
@ssmythe
ssmythe / kata_roman_numerals.features
Last active August 29, 2015 14:27
Roman Numerals Kata Cucumber features file
Feature: Kata Roman Numerals
For this Kata, write a function to convert from normal (Arabic)
numbers to Roman Numerals:
1 -> I
10 -> X
7 -> VII
etc.
There is no need to be able to convert numbers larger than
about 3000. (The Romans themselves didn't tend to go any
\curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
\curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm --version
rvm install 1.9.3
rvm use 1.9.3
rvm --default use 1.9.3
rvm docs generate-ri
rvm default
ruby --version
#!/usr/bin/env bash
echo "p4d: install p4 yum repo"
cat > /etc/yum.repos.d/perforce.repo <<EOF
[perforce]
name=Perforce
baseurl=http://package.perforce.com/yum/rhel/6/x86_64/
enabled=1
gpgcheck=1
EOF