Installing rabbitmq: https://bugzilla.mozilla.org/show_bug.cgi?id=561459#c0
$ rabbitmq-server +---+ +---+ | | | | | | | |
| #!/usr/local/php5-fcgi/bin/php | |
| <?php | |
| $out = shell_exec('mysql -u root -p'); | |
| if (false !== strpos($out, 'Enter password')) { | |
| fwrite(STDOUT, "mypassword-here"); | |
| $resp = trim(fgets(STDIN)); | |
| fwrite(STDOUT, $resp); | |
| } |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>そう簡単には読ませてあげませんったー</title> | |
| <link href="style.css" rel="stylesheet"> | |
| <script src="http://www.google.com/jsapi"></script> | |
| <script src="/socket.io/socket.io.js"></script> | |
| <script> | |
| google.load('jquery', '1.4.3'); |
| # Got this message printed out repeatedly on the terminal screen while trying to install some packages using yum | |
| # rpmdb: unable to lock mutex: Invalid argument | |
| # rpmdb: unable to lock mutex: Invalid argument | |
| # rpmdb: unable to lock mutex: Invalid argument | |
| # rpmdb: unable to lock mutex: Invalid argument | |
| # rpmdb: unable to lock mutex: Invalid argument | |
| # rpmdb: unable to lock mutex: Invalid argument | |
| # rpmdb: unable to lock mutex: Invalid argument | |
| # rpmdb: unable to lock mutex: Invalid argument |
| package hello; | |
| import javax.microedition.midlet.*; | |
| import javax.microedition.io.*; | |
| import javax.microedition.lcdui.*; | |
| import java.io.*; | |
| /** | |
| * @author Pcdinh | |
| */ |
| Some thoughts about Celery and logging | |
| ====================================== | |
| LoggerAdapter | |
| ------------- | |
| It appears that the use of LoggerAdapter is to get the processName into the | |
| LogRecord (at least, that's what _CompatLoggerAdapter does) but if | |
| LoggerAdapter is defined in logging, _CompatLoggerAdapter won't be used. |
$ rabbitmq-server +---+ +---+ | | | | | | | |
| class BackupArchiveGenerator(Task): | |
| def get_archive_name(self, tenant, date, archive): | |
| """ | |
| Build and return the archive name based on the requested archive. | |
| """ | |
| filename = '%s_to_%s' % (date.strftime('%Y_%m_%d'), datetime.datetime.today().strftime('%Y_%m_%d')) | |
| if archive: | |
| filename = "%s_archive" % filename | |
| destination = os.path.join(tenant.subdomain, '%s.zip' % filename) |
| L1 cache reference | 0.5 ns | |
| Branch mispredict | 5 ns | |
| L2 cache reference | 7 ns | |
| Mutex lock/unlock | 25 ns | |
| Main memory reference | 100 ns | |
| Compress 1K bytes w/ cheap algorithm | 3,000 ns | |
| Send 2K bytes over 1 Gbps network | 20,000 ns | |
| Read 1 MB sequentially from memory | 250,000 ns | |
| Round trip within same datacenter | 500,000 ns | |
| Disk seek | 10,000,000 ns |
| #!/usr/bin/env python | |
| """ | |
| test_http_conns.py - Tests for how HTTP persistent connections are handled, | |
| including pipelining. | |
| This script will set up a server which summarises how a browser connecting | |
| to it behaves. For example, FireFox with pipelining turned on will give: | |
| --->8--- |
| Process: Python [1502] | |
| Path: /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python | |
| Identifier: Python | |
| Version: ??? (???) | |
| Code Type: X86-64 (Native) | |
| Parent Process: Python [309] | |
| Date/Time: 2011-01-28 10:24:58.125 +0700 | |
| OS Version: Mac OS X 10.6.5 (10H574) | |
| Report Version: 6 |