Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀

Nick Hobart nwhobart

🚀
View GitHub Profile
@nwhobart
nwhobart / 0006_sumologic.config
Created Nov 9, 2015
Our ebextension for sumologic.
View 0006_sumologic.config
packages:
rpm:
SumoCollector: https://collectors.sumologic.com/rest/download/rpm/64
services:
sysvinit:
collector:
enabled: true
ensureRunning: true
files:
@nwhobart
nwhobart / aws-deploy.sh
Last active Oct 27, 2015
How we deploy to AWS Elastic Beanstalk with multiple sumo logic accounts.
View aws-deploy.sh
#!/bin/bash
# simple script for using eb deploy in a bash script
app=$(cat config/application.rb |grep -i "module" |awk '{ print tolower ($2) }' )
current_date=$(date +"%Y%m%d-%T%Z")
current_user=$(whoami)
if [ ! -f .elasticbeanstalk/config.yml ]; then
echo "You need to run 'eb init' first!"
else
View s3mysqlbackup.sh
#!/bin/bash
# Basic variables
mysqlpass="########"
bucket="s3://#####-prod-data-####/######-#"
host="####-########-rds-platform-1.######.us-east-1.rds.amazonaws.com"
# Timestamp (sortable AND readable)
stamp=`date +"%s - %A %d %B %Y @ %H%M"`
View gist:309d867d75d6667b35b2
echo "Running a check on your DB creds"
mysql -u backup -p$mysqlpass -h $host -e "SHOW DATABASES;" &>/dev/null
rc=$?; if [[ $rc != 0 ]]; then echo "not working; check your creds" && exit $rc; fi