This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#[email protected] | |
set -e | |
SYS_DOMAIN=$1 | |
APP_DOMAIN=$2 | |
VIP=$3 | |
SSL_FILE=sslconf-${SYS_DOMAIN}.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /root/.*history /home/*/.*history -exec rm -f {} \; | |
find / -name "authorized_keys" –exec rm –f {} \; | |
find /root/ /home/*/ -name .cvspass –exec rm –f {} \; | |
find /root/.subversion/auth/svn.simple/ /home/*/.subversion/auth/svn.simple/ -exec rm –rf {} \; | |
rm /etc/syslog.conf | |
service rsyslog restart | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#no PATH, no way to accidently run any programs | |
PATH='' | |
#useful variables | |
term_height=0 | |
term_width=0 | |
term_scroll_height=0 | |
status_line_row=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -oE "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)" file.txt | |
# for 0.0.0.0 to 999.999.999.999 | |
# grep -oE "([0-9]{1,3}[\.]){3}[0-9]{1,3}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.microsoft.com/en-us/download/details.aspx?id=41653 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# su - <user> | |
# run this before running screen | |
script /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/vcap/packages/postgres/bin/psql -h 127.0.0.1 -p 5432 -U postgres bosh | |
# $\dt; to list tables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default_env: | |
# Default vcap & root password on deployed VMs (ie c1oudc0w) | |
# Generated using mkpasswd -m sha-512 | |
bosh: | |
password: (( merge || "$6$4gDD3aV0rdqlrKC$2axHCxGKIObs6tAmMTqYCspcdvQXh3JJcvWOY2WGb4SrdXtnCyNaWlrf3WEqvYR2MYizEGp3kMmbpwBC6jsHt0" )) | |
# From https://github.com/starkandwayne/cf-pipeline/blob/master/try-anything/pipeline/cf-release/cf-deployment.yml#L9-L10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
token="$(uaac context | awk '/^ *access_token\: *([a-zA-Z0-9.\/+\-_]+) *$/ {print $2}' -)" | |
curl -H"Authorization: bearer $token" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub |