Once installed, you can run a test against your load balancer or web server:
Using Apache Benchmark (ab):
ab -n 500000 -c 500 http://your-load-balancer-dns-name/Using hey:
| function parse_git_branch() { | |
| git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p' | |
| } | |
| COLOR_DEF=$'\e[0m' | |
| COLOR_USR=$'\e[38;5;243m' | |
| COLOR_DIR=$'\e[38;5;197m' | |
| COLOR_GIT=$'\e[38;5;39m' | |
| setopt PROMPT_SUBST | |
| export PROMPT='${COLOR_USR}%n ${COLOR_DIR}%~ ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF} $ ' |
| #!/usr/bin/bash | |
| # Clone | |
| # Build | |
| # Deploy | |
| # Notes: | |
| # # Save the shell script with a '.sh' extension |
| set linenumbers | |
| set tabsize 4 | |
| set autoindent | |
| set tabstospaces |
| # Usage: --filters "Name=string,Values=string,string..." | |
| # Example using `tag` key-value pairs: | |
| aws ec2 describe-instances --filters "Name=tag:<tag_name>,Values=<value1>,<value2>..." | |
| # Example using `tag-key` name: | |
| # Note: This only looks at the key name(s), not the value of the key(s). | |
| aws ec2 describe-instances --filters "Name=tag-key,Values=<tag-key1>,<tag-key2>..." |
| #!/bin/bash | |
| # For CA certs. | |
| curl -so /dev/null -w "%{http_code}" https://google.com/ | |
| # For self-signed certs: | |
| curl --insecure -so /dev/null -w "%{http_code}" https://somesite.com/ |
| # Range of commits | |
| # git revert --no-edit <first_bad_commit_hash>..<last_bad_commit_hash> | |
| git revert --no-edit 1abeb478e11..e272b5a3680 | |
| # Single commit | |
| # git revert --no-edit <bad_commit_hash> | |
| git refert --no-edit e272b5a3680 |
| # The following will create an DST offset in the US. Obviously, if you're in an area that doesn't | |
| # observe DST (Arizona, etc.), this doesn't apply. To tweak it for your specific TZ, change the last value to | |
| # your UTC offset during the summer months. A chart is below. I threw this together pretty quick, | |
| # so it may need a bit of tweaking. It's a modified version of the PromQL found on Medium, here: | |
| # https://link.medium.com/vcfRGNuYv0 | |
| # 4 - Eastern | |
| # 5 - Central | |
| # 6 - Mountain | |
| # 7 - Pacific |
| # Use root/example as user/password credentials | |
| version: '3.1' | |
| services: | |
| mongo: | |
| image: mongo | |
| restart: always | |
| environment: | |
| MONGO_INITDB_ROOT_USERNAME: root |
| #Using Notepad as an example. | |
| $target = "notepad" | |
| #Get the process | |
| $process = Get-Process -Name $target -ErrorAction SilentlyContinue | |
| #Get the execution state of the thread. | |
| $threads=$process.Threads | |
| $threads | select Id,ThreadState,WaitReason |