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
# Configure local alias | |
bosh alias-env <bosh alias name> -e <bosh director ip> --ca-cert <(bosh int ./creds.yml --path /director_ssl/ca) | |
# Log in to the Director | |
export BOSH_CLIENT=admin | |
export BOSH_CLIENT_SECRET=`bosh int ./creds.yml --path /admin_password` | |
# Query the Director for more info | |
bosh -e <bosh alias name> env |
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
cat <yaml to patch> | yaml-patch -o <yaml patch file> > <patched yaml> |
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
# generate ssh private/public key | |
ssh-keygen -t rsa -b 4096 -C "[email protected]" | |
# start ssh agent in background | |
eval "$(ssh-agent -s)" | |
# add ssh private key to agent | |
ssh-add ~/.ssh/id_rsa | |
# copy to clipboard (xclip needs to be installed) |
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
Add the following script to /etc/profile.d | |
#!/bin/bash | |
xinput -set-prop "DualPoint Stick" "Device Enabled" 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
@echo off | |
set "psCommand=powershell -Command "$pword = read-host 'Enter Password' -AsSecureString ; ^ | |
$BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^ | |
[System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)"" | |
for /f "usebackq delims=" %%p in (`%psCommand%`) do set password=%%p | |
echo %password% |
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
git update-index --chmod=+x <file> |
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
PLANS_PROPERTY=".properties.rds_postgres_plans" | |
PLAN_NAME=".properties.rds_postgres_plans" | |
jq --arg plans_property "$PLANS_PROPERTY" --arg plan_name "$PLAN_NAME" '.properties | to_entries[] | select(.key == $plans_property) | .value.value[] | select(.name.value == $plan_name)' |
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
[to_entries[] | {(.key) : .value.value}] | reduce .[] as $item ({}; . + $item) |
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 | |
SUDO_PWD=superSecurePassword | |
ROOT_USER=root | |
SERVER=10.0.0.097879879 | |
SCRIPT_TO_RUN=script_to_run.sh | |
SUDO_ECHO_SCRIPT=sudo_echo.sh | |
# generate script to run on remote server |
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
# 1) ssh into gorouter | |
# 2) get router_status credentials from /var/vcap/jobs/gorouter/config/gorouter.yml or from bosh manifest router job | |
# 3) get routes | |
curl "http://router_status:<router_status password>@127.0.0.1:8080/routes" | python -m json.tool |
OlderNewer