Skip to content

Instantly share code, notes, and snippets.

View haydonryan's full-sized avatar

Haydon Ryan haydonryan

View GitHub Profile
#/bin/bash
newfile () {
fname=$1
count=0
while [ -e "$fname" ]
do
# fname="$1.$((++count)).mp4"
fname="$(basename $1 .mp4).$((++count)).mp4"
done
@haydonryan
haydonryan / GPG Signed Commits
Last active February 17, 2018 16:42
Setting up Github GPG signing.
brew doctor
brew update
brew install -v gpg
gpg --full-generate-key
gpg --list-secret-keys --keyid-format LONG
# https://help.github.com/articles/generating-a-new-gpg-key/
sudo su - tempest-web -s /bin/bash -c 'psql tempest_production'
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'uaa_configs';
SELECT id, hostname
FROM uaa_configs;
UPDATE uaa_configs
bosh --ca-cert /var/tempest/workspaces/default/root_ca_certificate target DIRECTOR-IP-ADDRESS
#!/bin/bash
set -e
if [[ ($# -ne 3) && ($# -ne 2) ]]
then echo "wrong number of arguments:"
echo "create_cert sys_domain app_domain"
exit 1
fi
sudo service tempest-web stop
sudo service tempest-web start
#you will have to enter the decryption passphrase after this.
sudo killall -HUP mDNSResponder;say DNS cache has been flushed
sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache;say MacOS DNS cache has been cleared
SSH to OMD and become root
Switch to postgres user
Execute psql
Log into tempest_production database
Execute:
UPDATE installs SET status='failed', finished_at='2017-05-04T13:58:39.620Z', finished=true WHERE id='23';

Turn on debug logging

/home/tempest-web/tempest/web/config/environments/production.rb
config.log_level = :info   -> config.log_level = :debug

Creates logs in: /tmp/logs

# TODO:
# Add HTTP listener
# Add ssh listener
# Add Websockets Listener
export LOCATION="westus"
export RESOURCE_GROUP="pcfmarketplace"
export VNET="pcf-net"
export SUBNET="AppGatewaySubnet" # Note this can't have anything in the back of it.