Skip to content

Instantly share code, notes, and snippets.

Avatar

Patrick Crocker patrickcrocker

  • Dallas, TX
View GitHub Profile
View pivnet.sh
#!/bin/bash
[ "$1" = "-d" ] && debug=on || debug=off
# Make working directory
export wrkdir=/tmp/wrkdir.$$
mkdir -p ${wrkdir}
# Clean up function
clean_up()
{
View ovfupload
#!/bin/sh
echo "OVF Source File: "
read -r VCD_SRC_INPUT
export VCD_SRC=$VCD_SRC_INPUT
echo "vCloud Director Username: "
read -r VCD_USERNAME_INPUT
export VCD_USERNAME=$VCD_USERNAME_INPUT
@patrickcrocker
patrickcrocker / download-tile-and-upload-to-opsmgr.sh
Last active Oct 3, 2017
CLI download of Pivnet tile and upload to Ops Manager
View download-tile-and-upload-to-opsmgr.sh
#!/bin/bash
set -e
export PIVNET_TOKEN=GET_FROM_PIVNET_USER_PROFILE_PAGE
export OPSMGR_HOST=localhost
echo "Local file name: "
read -r LOCAL_FILE_NAME_INPUT
export LOCAL_FILE_NAME=$LOCAL_FILE_NAME_INPUT
@patrickcrocker
patrickcrocker / purge-unused-opsmgr-tiles.sh
Last active Nov 13, 2015
Purge unused tiles PCF Ops Manager tiles after deleting
View purge-unused-opsmgr-tiles.sh
#!/bin/sh
curl https://localhost/api/products -d '' -X DELETE -u admin -k