Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # Script to be placed in elasticsearch/bin | |
| # Launch it from elasticsearch dir | |
| # bin/backup indexname | |
| # We suppose that data are under elasticsearch/data | |
| # It will create a backup file under elasticsearch/backup | |
| if [ -z "$1" ]; then | |
| INDEX_NAME="dummy" | |
| else | |
| INDEX_NAME=$1 |
| //PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012 | |
| //UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler" | |
| //the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist | |
| (function(host) { | |
| function Crawler() { | |
| this.visitedURLs = {}; | |
| }; | |
| server { | |
| listen 80; | |
| server_name <domain> | |
| server_name_in_redirect off; | |
| access_log logs/<domain>.access.log; | |
| error_log logs/<domain>.error.log; | |
| gzip_static on; |
| #!/usr/bin/perl | |
| # This is HTTP proxy built atop AnyEvent::HTTPD and AnyEvent::HTTP modules. | |
| # I used it to solve some problem but after testing realised that it doesn't solve it entirely. | |
| # So I removed special logic and leave almost plain proxy. With referer forging however :) | |
| # | |
| # Test thoroughly before use! | |
| use strict; | |
| use warnings; |