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 * |
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
| <?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 | |
| $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
| # 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
| # 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
| <scheme name="Eclectide Monokai" version="124" parent_scheme="Default"> | |
| <option name="LINE_SPACING" value="1.0" /> | |
| <option name="EDITOR_FONT_SIZE" value="12" /> | |
| <option name="EDITOR_FONT_NAME" value="Consolas" /> | |
| <colors> | |
| <option name="ADDED_LINES_COLOR" value="295622" /> | |
| <option name="CARET_COLOR" value="bbbbbb" /> | |
| <option name="CARET_ROW_COLOR" value="" /> | |
| <option name="CONSOLE_BACKGROUND_KEY" value="272822" /> | |
| <option name="FILESTATUS_ADDED" value="629755" /> |
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 | |
| /* | |
| * simple HttpRequest example using PHP | |
| * tom slankard | |
| */ | |
| class HttpRequest { | |
| public $url = null; |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>Safari SQLite Hello World Example</title> | |
| <script type="text/javascript" src="jquery-1.4.2.min.js"></script> | |
| <script type="text/javascript"> | |
| // The first thing we want to do is create the local | |
| // database (if it doesn't exist) or open the connection | |
| // if it does exist. Let's define some options for our |
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
| from flask import Flask | |
| from flask.ext.sqlalchemy import SQLAlchemy | |
| from flask.ext.wtf import Form | |
| from flask.ext.babel import gettext | |
| from wtforms import SelectField, TelField, TextField, FormField, Fieldlist, SubmitField | |
| from wtforms.validators import Optional, Required | |
| app = Flask(__name__) | |
| db = SQLAlchemy(app) |
OlderNewer