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
| try: | |
| ai_list = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM) | |
| self.payload['latency'][host] = 0 #set default | |
| counter = 0; | |
| except socket.gaierror: | |
| self.stderr(host+" - getaddrinfo() error: {0}".format(sys.exc_info()[1])) | |
| continue | |
| for (family, socktype, proto, canon, sockaddr) in ai_list: |
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
| US-East (Virginia) 40 ms | |
| US-West (California) 98 ms | |
| US-West (Oregon) 120 ms | |
| Europe (Ireland) 140 ms | |
| Europe (Frankfurt) 153 ms | |
| Asia Pacific (Singapore) 271 ms | |
| Asia Pacific (Sydney) 279 ms | |
| Asia Pacific (Japan) 207 ms | |
| South America (Brazil) 178 ms |
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
| # prefork MPM | |
| # StartServers: number of server processes to start | |
| # MinSpareServers: minimum number of server processes which are kept spare | |
| # MaxSpareServers: maximum number of server processes which are kept spare | |
| # ServerLimit: maximum value for MaxClients for the lifetime of the server | |
| # MaxClients: maximum number of server processes allowed to start | |
| # MaxRequestsPerChild: maximum number of requests a server process serves | |
| <IfModule prefork.c> | |
| StartServers 4 | |
| MinSpareServers 4 |
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/sh | |
| # | |
| # chkconfig: 2345 55 25 | |
| # Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx | |
| # For Debian, run: update-rc.d -f nginx defaults | |
| # For CentOS, run: chkconfig --add nginx | |
| # | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $all |
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/sh | |
| # | |
| # openresty adapted script to start and stop the openresty compiled | |
| # nginx daemon | |
| # --- original nginx comment --- | |
| # nginx - this script starts and stops the nginx daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ |
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
| MongoDB upstart scripts for Ubuntu. | |
| Run following commands after installing upstart scripts: | |
| ln -s /lib/init/upstart-job /etc/init.d/mongoconf | |
| ln -s /lib/init/upstart-job /etc/init.d/mongodb | |
| ln -s /lib/init/upstart-job /etc/init.d/mongos | |
| To start services use: |
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
| apt-get install -y libreadline-dev libncurses5-dev libpcre3-dev \ | |
| libssl-dev perl make build-essential | |
| wget https://github.com/openresty/stream-lua-nginx-module/archive/v0.0.1.tar.gz \ | |
| -O /tmp/stream-lua-nginx-module-0.0.1.tar.gz | |
| mkdir /tmp/stream-lua-nginx-module-0.0.1 | |
| tar xzvf /tmp/stream-lua-nginx-module-0.0.1.tar.gz -C /tmp/stream-lua-nginx-module-0.0.1 |
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
| SSH agent forwarding is great. It allows you to ssh from one server to | |
| another all the while using the ssh-agent running on your local | |
| workstation. The benefit is you don't need to generate ssh key pairs | |
| on the servers you are connecting to in order to hop around. | |
| When you ssh to a remote machine the remote machine talks to your | |
| local ssh-agent through the socket referenced by the SSH_AUTH_SOCK | |
| environment variable. | |
| So you the remote server you can do something like: |
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
| apt-get install -y libreadline-dev libncurses5-dev libpcre3-dev \ | |
| libssl-dev perl make build-essential git curl \ | |
| unzip | |
| git clone https://github.com/openresty/stream-lua-nginx-module.git \ | |
| --branch master \ | |
| --single-branch /tmp/stream-lua-nginx-module-master | |
| curl -L https://github.com/slact/nchan/archive/v1.1.7.tar.gz | tar xz -C /tmp | |
| curl -L https://openresty.org/download/openresty-1.11.2.4.tar.gz | tar xz -C /tmp |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am wojonstech on github. | |
| * I am wojons (https://keybase.io/wojons) on keybase. | |
| * I have a public key ASAbAn1Ri_XaU88kK5vFUGYkgCKs81wNYtJW0SuyglwTQQo | |
| To claim this, I am signing this object: |