Skip to content

Instantly share code, notes, and snippets.

View dwelch2344's full-sized avatar

David Welch dwelch2344

View GitHub Profile
@dwelch2344
dwelch2344 / cronRestart.sh
Created June 29, 2015 05:59
Simple script to run in cron for resetting services
#!/bin/bash
PATH=/usr/sbin:/usr/bin:/sbin:/bin
if [[ ! "$(/usr/sbin/service mysql status)" =~ "start/running" ]]
then
/usr/sbin/service mysql start
sendemail -f [email protected] -t [email protected] -u subject -m "Restarted MySQL on ng-ocean" -s smtp.gmail.com -o tls=yes -xu [email protected] -xp "yourGmailPassword"
fi
@dwelch2344
dwelch2344 / installOpenVbx.sh
Last active February 11, 2018 22:24
A simple install script to setup OpenVbx on an Ubuntu 14.04 box
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
export DBNAME=openvbx
export DBUSER=openvbx
export DBPASS=openvbxPass
<Response>
<Dial>
<Queue>Queue Demo</Queue>
</Dial>
</Response>
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
function get_pwd() {
print -D $PWD
}
function battery_charge() {
@dwelch2344
dwelch2344 / ecs.sh
Created May 18, 2015 19:14
ubuntu 14 docker and ECS agent
#!/bin/bash
sudo su
wget -qO- https://get.docker.com/ | sh
exit
sudo usermod -aG docker $USER
CLUSTER=default
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<tags:template pageTitle="Application">
<jsp:attribute name="head">
I'm header content!
</jsp:attribute>
<jsp:attribute name="footer">
I'm footer content!
</jsp:attribute>
@dwelch2344
dwelch2344 / encrypt.sh
Created April 24, 2015 16:22
An example of how we encrypt our settings files with an OpenSSL cert
#!/bin/bash
if [ -z "$1" ]; then
echo "No configuration specified. Usage: $0 <config>"
exit 1
fi
CONFIG=$1
KEYFILE=conf/encrypt.crt

Keybase proof

I hereby claim:

  • I am dwelch2344 on github.
  • I am welch (https://keybase.io/welch) on keybase.
  • I have a public key whose fingerprint is E7A1 6AEA BC2A 0D29 0CDF 2F08 D02F CA38 F35E B676

To claim this, I am signing this object:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew install p7zip awscli maven postgres git node
# clone project
# configure AWS
# node deps
npm install -g bower gulp