总有那么些蛋疼的机房,为了所谓的这安全,将NTP 服务器一刀切了。这时候时间同步就是一个问题,不过我们还可以使用
rdate来解决。
yum -y install rdate
rdate -s time.nist.gov
cat > /etc/cron.daily/rdate << "EOF"
#!/bin/sh
rdate -s time.nist.gov
| # Ubuntu instructions | |
| # Get the pre-reqs for this (Ubuntu) | |
| sudo apt-get install git-core build-essential zlib1g-dev libpcre3 libpcre3-dev redis-server libssl-dev libgeoip-dev libgoogle-perftools-dev geoip-database lua5.1 liblua5.1-0 liblua5.1-0-dev lua-iconv-dev libghc-iconv-dev luarocks libpcre3-dev libghc-zlib-bindings-dev | |
| # For Centos: | |
| sudo yum install wget | |
| wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6 | |
| wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm |
| curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" http://inserturl.here |
总有那么些蛋疼的机房,为了所谓的这安全,将NTP 服务器一刀切了。这时候时间同步就是一个问题,不过我们还可以使用
rdate来解决。
yum -y install rdate
rdate -s time.nist.gov
cat > /etc/cron.daily/rdate << "EOF"
#!/bin/sh
rdate -s time.nist.gov
| import boto3 | |
| import time | |
| import re | |
| client = boto3.client('athena') | |
| # run athen query | |
| response = client.start_query_execution( | |
| QueryString=athena_query, | |
| QueryExecutionContext={'Database': ATHENA_DATABASE_NAME}, |
| #!/bin/bash | |
| set -o errexit | |
| clear | |
| # Set versions. Check http://openresty.org for latest version and bundled version of nginx. | |
| OPENRESTY_VERSION=1.9.3.1 | |
| NGINX_VERSION=1.9.3 | |
| OPENSSL_VERSION=1.0.2d | |
| NPS_VERSION=1.9.32.10 |
| { | |
| "env": { | |
| "browser": true, | |
| "es6": true, | |
| "node": true | |
| }, | |
| "extends": ["airbnb"], | |
| "globals": { | |
| "document": false, | |
| "escape": false, |