Skip to content

Instantly share code, notes, and snippets.

View ssmythe's full-sized avatar

Steve Smythe ssmythe

  • Reno, NV, USA
  • 11:22 (UTC -07:00)
View GitHub Profile
@ssmythe
ssmythe / upgrade-nexus-oss-centos6.sh
Created June 23, 2016 21:35
upgrade-nexus-oss-centos6.sh
#!/usr/bin/env bash
NEXUS_DEPLOY_VERSION=2.13.0
NEXUS_PATCH_LEVEL=01
echo "nexus: installing Nexus"
# Stop nexus
echo "nexus: Stop Nexus"
service nexus stop
@ssmythe
ssmythe / install_ruby_2.3.1_for_vagrant_user.sh
Created June 23, 2016 16:33
install_ruby_2.3.1_for_vagrant_user.sh
#!/usr/bin/env bash
su -l -c "curl -sSL https://gist.githubusercontent.com/ssmythe/4b86cd23b28861f504e6c7d8ac906d48/raw/edccfde60d7410f30814596a7f9d3c28430d2d27/install_ruby_2.3.1_via_rvm_no_docs.sh | bash" vagrant
@ssmythe
ssmythe / install_ruby_2.3.1_via_rvm_no_docs.sh
Created May 19, 2016 16:23
install_ruby_2.3.1_via_rvm_no_docs.sh
\curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
\curl -sSL https://get.rvm.io | bash -s stable
if [ -f /etc/profile.d/rvm.sh ]; then
source /etc/profile.d/rvm.sh
else
source ~/.profile
fi
rvm reload
rvm --version
rvm install 2.3.1
@ssmythe
ssmythe / Vagrantfile_for_capistrano_tutorial.rb
Last active June 23, 2016 16:43
Vagrantfile for use in learning Capistrano
# Rename this file to Vagrantfile
VAGRANTFILE_API_VERSION = '2'
# BRIDGES = [ 'en3: Thunderbolt Ethernet', 'en4: Thunderbolt Ethernet' ]
# CENTOS67_BOX_URL = 'http://boxes.local.tld/virtualbox/updated_centos_6.7.box'
# CENTOS67_BOX_NAME = 'updated/centos_6.7.box'
CENTOS67_BOX_NAME = 'bento/centos-6.7'
INSTALL_BASE_CENTOS6 = 'https://gist.githubusercontent.com/ssmythe/f88142c80076df5fac9b/raw/0574b105d06728dd1383460441375cbaa536684b/install-base-centos6.sh'
#!/usr/bin/env bash
su -l -c "gem install capistrano --version 2.15.5" vagrant
#!/usr/bin/env bash
su -l -c "curl -sSL https://gist.githubusercontent.com/ssmythe/538e220a229b58cc084b1fb03407aad8/raw/7b9c348fc050bb0e959f81fff8c22493514ccc37/install_ruby_2.3.0_via_rvm_no_docs.sh | bash" vagrant
\curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
\curl -sSL https://get.rvm.io | bash -s stable
if [ -f /etc/profile.d/rvm.sh ]; then
source /etc/profile.d/rvm.sh
else
source ~/.profile
fi
rvm reload
rvm --version
rvm install 2.3.0
@ssmythe
ssmythe / install-jenkins-2.0-centos6.sh
Created April 4, 2016 21:40
install-jenkins-2.0-centos6.sh
#!/usr/bin/env bash
#
# JAVA OPENJDK
#
echo "jenkins: Install Java"
# https://issues.jenkins-ci.org/browse/JENKINS-31102
yum -y install java-1.8.0-openjdk
@ssmythe
ssmythe / verify_unicorn_is_running.sh
Created March 4, 2016 22:39
Verify that unicorn is running by checking its log file
#!/usr/bin/env bash
echo "verify_unicorn_running: Verifying Unicorn is running"
sleep 2
COUNTER=0
grep -q 'master process ready' /var/www/my_app/log/unicorn.log
while [[ $? -ne 0 && $COUNTER -lt 60 ]]; do
sleep 2
let COUNTER+=2
echo "verify_unicorn_running: Waiting for Unicorn to initialize... ($COUNTER seconds so far)"
@ssmythe
ssmythe / patch_dhclient.conf_centos6.sh
Created February 26, 2016 05:45
Fixes /etc/dhcp/dhclient.conf when using base centos6 build script when hostname is localhost
#!/usr/bin/env bash
echo "patch: patching /etc/dhcp/dhclient.conf"
sed -i "s/localhost/$(hostname)/g" /etc/dhcp/dhclient.conf
/sbin/service network restart
echo "patch: display hostname FQDN"
hostname -f