Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
| #!/usr/bin/env bash | |
| # https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
| sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | |
| sudo apt-get update | |
| sudo apt-get install docker-ce | |
| # https://docs.docker.com/compose/install/ |
| #!/usr/bin/env bash | |
| set -e | |
| # https://docs.docker.com/engine/install/ubuntu/ | |
| sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 2>/dev/null | |
| sudo echo "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') bionic stable" > /etc/apt/sources.list.d/docker.list | |
| sudo apt-get -y update |
| # Uncomment the next line if you have installed wkhtmltopdf | |
| # sudo apt remove wkhtmltopdf | |
| cd ~ | |
| # Select an appropriate link for your system (32 or 64 bit) from the page https://wkhtmltopdf.org/downloads.html and past to the next line | |
| wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
| tar xvf wkhtmltox*.tar.xz | |
| sudo mv wkhtmltox/bin/wkhtmlto* /usr/bin | |
| sudo apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig |
| { | |
| "registry": "https://registry.bower.io" | |
| } |
Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
| # maximum capability of system | |
| user@ubuntu:~$ cat /proc/sys/fs/file-max | |
| 708444 | |
| # available limit | |
| user@ubuntu:~$ ulimit -n | |
| 1024 | |
| # To increase the available limit to say 200000 | |
| user@ubuntu:~$ sudo vim /etc/sysctl.conf |
| var login = 'testuser'; //логин пользователя | |
| var password = 'SuperMEgaPa$$'; //пароль | |
| var email = '[email protected]'; // email | |
| /* Code */ | |
| var b = BS.LoginForm; | |
| var public_key = $F("publicKey"); | |
| var encrypted_pass = BS.Encrypt.encryptData(password, $F("publicKey")); | |
| var parameters = 'username1='+login+'&email='+encodeURIComponent(email)+'&submitCreateUser=&publicKey='+public_key+'&encryptedPassword1='+encrypted_pass+'&encryptedRetypedPassword='+encrypted_pass; | |
| var c = OO.extend(BS.ErrorsAwareListener, { | |
| onDuplicateAccountError: function(b) { |
| rabbitmqctl add_user test test | |
| rabbitmqctl set_user_tags test administrator | |
| rabbitmqctl set_permissions -p / test ".*" ".*" ".*" |
| """ | |
| Thanks to gane5h for the original script. this is a small kludgy tweak to that one. | |
| Custom parser for nginx log suitable for use by Datadog 'dogstreams'. | |
| To use, add to datadog.conf as follows: | |
| dogstreams: [path to ngnix log (e.g: "/var/log/nginx/access.log"]:[path to this python script (e.g "/usr/share/datadog/agent/dogstream/nginx.py")]:[name of parsing method of this file ("parse")] | |
| so, an example line would be: | |
| dogstreams: /var/log/nginx/access.log:/usr/share/datadog/agent/dogstream/nginx.py:parse | |
| Log of nginx should be defined like that: | |
| log_format time_log '$time_local "$request" S=$status $bytes_sent T=$request_time R=$http_x_forwarded_for'; | |
| when starting dd-agent, you can find the collector.log and check if the dogstream initialized successfully |
| """ | |
| Custom parser for nginx log suitable for use by Datadog 'dogstreams'. | |
| To use, add to datadog.conf as follows: | |
| dogstreams: [path to ngnix log (e.g: "/var/log/nginx/access.log"]:[path to this python script (e.g "/usr/share/datadog/agent/dogstream/nginx.py")]:[name of parsing method of this file ("parse")] | |
| so, an example line would be: | |
| dogstreams: /var/log/nginx/access.log:/usr/share/datadog/agent/dogstream/nginx.py:parse | |
| Log of nginx should be defined like that: | |
| log_format time_log '$time_local "$request" S=$status $bytes_sent T=$request_time R=$http_x_forwarded_for'; | |
| when starting dd-agent, you can find the collector.log and check if the dogstream initialized successfully | |
| """ |