Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
| #!/bin/bash | |
| # Program: | |
| # EC2 initially install node.js, git for development environment. | |
| # You can modify nodev and nvmv for changing node and nvm version. | |
| # Set permission to ec2-user install above. | |
| # History: | |
| # 2017/07/25 Hans First release | |
| home=/home/ec2-user | |
| nodev='8.11.2' | |
| nvmv='0.33.11' |
| #!/bin/bash | |
| apt-get -y update | |
| cat > /tmp/subscript.sh << EOF | |
| # START UBUNTU USERSPACE | |
| echo "Setting up NodeJS Environment" | |
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash | |
| echo 'export NVM_DIR="/home/ubuntu/.nvm"' >> /home/ubuntu/.bashrc | |
| echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> /home/ubuntu/.bashrc | |
| # Dot source the files to ensure that variables are available within the current shell | |
| . /home/ubuntu/.nvm/nvm.sh |
| <?php | |
| // See: http://blog.ircmaxell.com/2013/02/preventing-csrf-attacks.html | |
| // Start a session (which should use cookies over HTTP only). | |
| session_start(); | |
| // Create a new CSRF token. | |
| if (! isset($_SESSION['csrf_token'])) { | |
| $_SESSION['csrf_token'] = base64_encode(openssl_random_pseudo_bytes(32)); | |
| } |