For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
| # Class for managing multiple servers or anything with start() and stop() methods | |
| class ServerRack(object): | |
| def __init__(self, servers): | |
| self.servers = servers | |
| def start(self): | |
| started = [] | |
| try: |
| # encoding: utf-8 | |
| """ | |
| A python logging Handler that use ZeroMQ (ØMQ). | |
| +------+ +------+ +-------+ | |
| | app1 | | app2 | | app X | | |
| +------+ +------+ +-------+ | |
| | PUSH | PUSH | PUSH | |
| | | | |
| #!/bin/bash | |
| OPENSSL_VERSION="1.0.1g" | |
| curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz | |
| tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
| mv openssl-$OPENSSL_VERSION openssl_i386 | |
| tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
| mv openssl-$OPENSSL_VERSION openssl_x86_64 | |
| cd openssl_i386 |
| package main | |
| import ( | |
| "bytes" | |
| "exec" | |
| "log" | |
| "os" | |
| ) | |
| // Pipeline strings together the given exec.Cmd commands in a similar fashion |
| """ | |
| run with: | |
| gunicorn -w 1 --worker-class gevent web | |
| open in a browser: | |
| localhost:8000/consumer | |
| localhost:8000/consumer | |
| localhost:8000/producer |
| 似たような感じの文章多いデータ(yellow page)でやった | |
| 0 = 32.5KB | |
| 1 = 10.3KB | |
| 2 = 10.2KB | |
| 3 = 10.0KB | |
| 4 = 9.8KB | |
| 5 = 9.6KB | |
| 6 = 9.5KB | |
| 7 = 9.5KB |
| package main | |
| import ( | |
| "net" | |
| "os" | |
| ) | |
| func main() { | |
| strEcho := "Halo" | |
| servAddr := "localhost:6666" | |
| tcpAddr, err := net.ResolveTCPAddr("tcp", servAddr) |
| jQuery(function($) { | |
| $('form[data-async]').live('submit', function(event) { | |
| var $form = $(this); | |
| var $target = $($form.attr('data-target')); | |
| $.ajax({ | |
| type: $form.attr('method'), | |
| url: $form.attr('action'), | |
| data: $form.serialize(), |
First, you have to enable profiling
> db.setProfilingLevel(1)
Now let it run for a while. It collects the slow queries ( > 100ms) into a capped collections, so queries go in and if it's full, old queries go out, so don't be surprised that it's a moving target...