Skip to content

Instantly share code, notes, and snippets.

View patrickcrocker's full-sized avatar

Patrick Crocker patrickcrocker

  • Dallas, TX
View GitHub Profile
@mandarjog
mandarjog / update_opsmanager_hostname.sh
Created April 22, 2016 14:34
After a 1.7+ opsmanager restarts with a new ip address, this script will update it in the database
#!/bin/bash
# After a 1.7+ opsmanager restarts with a new ip address
# ssh into the opsmanager as 'ubuntu' and
# Run this file from the opsmanager as follows
# sudo su -l postgres < thisfile.sh >
# Get the current public ip or hostname from aws metadata
HN=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
@mnemesh-pivotal
mnemesh-pivotal / get_piv_sw.sh
Last active June 21, 2016 15:26
Interactive script for downloading software from network.pivotal.io using the download API. I have created a newer version at https://gist.github.com/mnemesh-pivotal/940d4358e421fd19caad42d03a1af7c3. It uses jq instead of sed/awk/grep/tac/etc to gather information from the the json files.
#!/bin/bash
[ "$1" = "-d" ] && debug=on || debug=off
# Make working directory
export wrkdir=/tmp/wrkdir.$$
mkdir -p ${wrkdir}
# Clean up function
clean_up()
{