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 | |
| # update | |
| sudo apt-get -y update | |
| # install dependency | |
| sudo apt-get -y install git php5-fpm php5 php5-mcrypt php5-gd php5-cli php5-json php5-curl curl php-pear php5-mysql nginx build-essential mysql-server | |
| # enable mcrypt | |
| sudo php5enmod mcrypt |
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 | |
| # install java 8 | |
| sudo add-apt-repository ppa:openjdk-r/ppa | |
| sudo apt-get -y update | |
| sudo apt-get install -y openjdk-8-jdk | |
| # install zookeper, mesos, marathon, chronos | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E56151BF | |
| DISTRO=$(lsb_release -is | tr '[:upper:]' '[:lower:]') |
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 | |
| NAMESPACE="$1" | |
| NAME="$2" | |
| TAG="$3" | |
| echo "==================================" | |
| echo "|| ||" | |
| echo "|| Docker image builder ||" | |
| echo "|| ||" |
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
| var mqtt = require('mqtt') | |
| var client = mqtt.connect('mqtt://test.mosquitto.org') | |
| client.on('connect', function () { | |
| client.subscribe('presence') | |
| client.publish('presence', 'Hello mqtt') | |
| }) | |
| client.on('message', function (topic, message) { | |
| // message is Buffer |
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 | |
| # download | |
| wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
| # unzip | |
| unzip ngrok-stable-linux-amd64.zip | |
| # move to /usr/local/bin | |
| sudo mv ngrok /usr/local/bin |
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 | |
| # Prepare for new repos | |
| sudo apt-get -y install apt-transport-https ca-certificates software-properties-common curl | |
| # Add docker repo | |
| sudo 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 \ | |
| $(lsb_release -cs) \ | |
| stable" |
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 | |
| # Download latest kubectl version | |
| curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl | |
| # change permission to executable binary | |
| chmod +x ./kubectl | |
| # move to /usr/local/bin | |
| sudo mv ./kubectl /usr/local/bin/kubectl |
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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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 | |
| # install qemu and other stuffs | |
| sudo apt-get install qemu \ | |
| qemu-system \ | |
| qemu-utils \ | |
| uml-utilities \ | |
| virt-manager \ | |
| dmg2img \ | |
| git \ |
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
| call plug#begin('~/.vim/plugged') | |
| Plug 'fatih/vim-go' | |
| Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
| Plug 'preservim/nerdtree' | |
| Plug 'vim-airline/vim-airline' | |
| Plug 'tpope/vim-fugitive' | |
| call plug#end() | |
| syntax on | |
| colo pablo |