Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nwhobart's full-sized avatar
🚀

Nick Hobart nwhobart

🚀
View GitHub Profile
@nwhobart
nwhobart / FML.sh
Last active December 23, 2016 15:46
#!/usr/bin/env bash
ssh -t user@server.com 'df -h'
^^^^^^ does not work ^^^^^^^
ssh: command not found
------------------------------------------
#!/usr/bin/env bash
// Hide on click.
if (config.hideOnClick) {
$this.find('a')
.css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)');
$this
.on('click', 'a', function(event) {
var $a = $(this),

Keybase proof

I hereby claim:

  • I am hobakill on github.
  • I am hobart (https://keybase.io/hobart) on keybase.
  • I have a public key ASB1OLdjeTVyPeO_eSL-zT09ejXr0tvrmMDqxecYg3xKGAo

To claim this, I am signing this object:

@nwhobart
nwhobart / 0006_sumologic.config
Created November 9, 2015 16:56
Our ebextension for sumologic.
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 October 27, 2015 20:05
How we deploy to AWS Elastic Beanstalk with multiple sumo logic accounts.
#!/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
@nwhobart
nwhobart / s3mysqlbackup.sh
Created September 25, 2015 21:15
Upload to S3
#!/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"`
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