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
| # Install dependencies | |
| # | |
| # * checkinstall: package the .deb | |
| # * libpcre3, libpcre3-dev: required for HTTP rewrite module | |
| # * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module | |
| apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \ | |
| mkdir -p ~/sources/ && \ | |
| # Compile against OpenSSL to enable NPN |
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
| # Building static nginx for teh lulz | |
| # | |
| # basic dependencies | |
| sudo apt-get install libxslt1-dev libxml2-dev zlib1g-dev libpcre3-dev libbz2-dev libssl-dev | |
| # download nginx and openssl | |
| wget http://nginx.org/download/nginx-1.5.6.tar.gz | |
| tar xf nginx-1.5.6.tar.gz; cd nginx-1.5.6 |
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
| <?php | |
| $gmw = new GearmanWorker(); | |
| $gmw->addServer(); | |
| $gmw->addFunction('test', function(GearmanJob $job) { | |
| throw new Exception('Boom'); | |
| }); | |
| while(1) $gmw->work(); |
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
| <?php | |
| $gmc= new GearmanClient(); | |
| $gmc->addServer(); | |
| $gmc->setExceptionCallback(function(GearmanTask $task) { | |
| $m = $task->data(); | |
| echo "Exception: {$m}\n"; |
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
| <?php | |
| $complete = 0; | |
| $fail = 0; | |
| $gmc = new GearmanClient; | |
| $gmc->addServer(); | |
| $gmc->setCompleteCallback(function() use (&$complete) { | |
| $complete++; |
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
| #!/usr/bin/env python | |
| import sys | |
| import datetime | |
| import time | |
| from datetime import timedelta | |
| sys.path.append('/home/reb/local/azure-sdk-for-python/') | |
| from azure.storage import * |
NewerOlder