REST API response format based on some of the best practices
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 | |
| sudo apt install -y \ | |
| coreutils \ | |
| tmux | |
| wget https://raw.githubusercontent.com/codeandrew/shell-scripts/master/Configs/ubuntu_profile | |
| mv ubuntu_profile ~/.myprofile | |
| wget https://raw.githubusercontent.com/codeandrew/shell-scripts/master/Configs/tmux.conf | |
| mv tmux.conf ~/.tmux.conf |
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
| image: java:8-jdk | |
| stages: | |
| - build | |
| - test | |
| - deploy | |
| before_script: | |
| # - echo `pwd` # debug | |
| # - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug |
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
| ########## Install NGINX ############## | |
| # Install software-properties-common package to give us add-apt-repository package | |
| sudo apt-get install -y software-properties-common | |
| # Install latest nginx version from community maintained ppa | |
| sudo add-apt-repository ppa:nginx/stable | |
| # Update packages after adding ppa |
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
| # -*- coding: utf-8 -*- | |
| from sys import argv, stderr, exit | |
| from geoip import geolite2 | |
| IP_PROVIDER = "http://httpbin.org/ip" | |
| comma_sep = lambda x: ", ".join([str(y) for y in x]) | |
| if not argv[1:]: | |
| from urllib2 import urlopen |