jq is useful to slice, filter, map and transform structured json data.
brew install jq
| #!/bin/bash | |
| hosts=$@ | |
| date_cmd="" | |
| if [[ "$OSTYPE" == "darwin"* ]]; then | |
| # make sure you have 'coreutils' -- brew install coreutils | |
| date_cmd="gdate" | |
| else | |
| date_cmd="date" |
| version: "3" | |
| services: | |
| sonarqube: | |
| image: sonarqube | |
| expose: | |
| - 9000 | |
| ports: | |
| - "127.0.0.1:9000:9000" | |
| networks: |
| #!/bin/bash | |
| # Load balance multiple internet connections. Requires iproute2, awk and grep. | |
| # (C) 2016 Tobias Girstmair, isticktoit.net, GPLv2 | |
| # Also useful: speedometer -l -r eth1 -t eth1 -m $(( 1024 * 1024 * 3 / 2 )) | |
| # Not much user error checking is done - only pass working network connections | |
| # script needs root to work and at least two interfaces to be useful | |
| [ $EUID -eq 0 -a $# -ge 2 ] || { | |
| echo "Usage (as root): $0 iface1[:weight1] iface2[:weight2] ..." >&2 |
| server { | |
| listen 80; | |
| listen 443 default_server ssl; | |
| ssl on; | |
| ssl_certificate /etc/ssl/certs/myssl.crt; | |
| ssl_certificate_key /etc/ssl/private/myssl.key; | |
| server_name *.example.com; | |
| root /var/www/vhosts/website; |
| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |