This file contains hidden or 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 | |
| # generate-script.sh | |
| # Based on an idea by Albert Reiner. | |
| OUTFILE=generated.sh # Name of the file to generate. | |
| # ----------------------------------------------------------- | |
| # 'Here document containing the body of the generated script. | |
| ( |
This file contains hidden or 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
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: sftp | |
| --- | |
| kind: Service | |
| apiVersion: v1 | |
| metadata: |
This file contains hidden or 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 | |
| BASE_URL="https://releases.hashicorp.com" | |
| DOWNLOAD_DIR=$HOME/Downloads | |
| BIN_DIR=$HOME/bin | |
| check_installed_version(){ | |
| installed_version=$($1 version | head -n1 | awk '{if ($2 ~ /v.*/){print $2}else{print $NF}}' | tr -d 'v') | |
| echo "$installed_version" |
This file contains hidden or 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 | |
| # | |
| # dockerpsns - proof of concept for a "docker ps --namespaces". | |
| # | |
| # USAGE: ./dockerpsns.sh | |
| # | |
| # This lists containers, their init PIDs, and namespace IDs. If container | |
| # namespaces equal the host namespace, they are colored red (this can be | |
| # disabled by setting color=0 below). | |
| # |
This is a collection of the most common commands I run while administering Elasticsearch databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose.
https://www.elastic.co/guide/en/elasticsearch/client/curator/5.x/command-line.html
I would suggest using my ELK vagrant project to use these commands:
This file contains hidden or 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. You mast have a public key from your mashine stored on github as SSH key here: | |
| https://github.com/settings/ssh | |
| How to create ssh key on unix/mac os x: | |
| - Open terminal, go to the root typing: $ cd ~ (recommended) | |
| - Type: ssh-keygen -t rsa -C "your@email.address" | |
| - To secure your ssh key ststem will ask you for passphrase (recommended) but you can skip it also | |
| - That's you have the ssh key | |
| - Check it with: $ ls -al ~/.ssh |