http://www.microsoft.com/en-us/download/details.aspx?id=30474
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
| '''pass_socket.py | |
| Written September 14, 2012 | |
| Released into the public domain. | |
| Works on Python 2.6, 2.7, and may need minor changes for 3+. | |
| ''' | |
| import multiprocessing |
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
| """ | |
| Example of setting up CORS with Bottle.py. | |
| """ | |
| from bottle import Bottle, request, response, run | |
| app = Bottle() | |
| @app.hook('after_request') | |
| def enable_cors(): | |
| """ |
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
| /* | |
| AjaxHook.js - A simple utility library for intercepting Ajax calls. | |
| This may be useful to inject simple interceptors to analyze pr capture Ajax traffic and may be even useful for automation tests to determine when an Ajax response returns. | |
| To use : | |
| 1>Create a new AjaxHook object | |
| var hook = new AjaxHook(); |
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
| # -*- coding: utf-8 -*- | |
| import re | |
| import distutils.sysconfig as sysconfig | |
| import os | |
| __doc__ = '''set-me-up. | |
| Usage: | |
| set-me-up <projectdir> | |
| ''' |
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
| /* | |
| * Takes provided URL passed as argument and make screenshots of this page with several viewport sizes. | |
| * These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed | |
| * | |
| * Usage: | |
| * $ casperjs screenshots.js http://example.com | |
| */ | |
| var casper = require("casper").create(); |
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
| function deg2rad(deg) { | |
| return deg * Math.PI / 180; | |
| } | |
| function annularSector(centerX, centerY, startAngle, endAngle, innerRadius, outerRadius) { | |
| startAngle = deg2rad(startAngle + 180); | |
| endAngle = deg2rad(endAngle + 180); | |
| var p = [ | |
| [centerX + innerRadius * Math.cos(startAngle), centerY + innerRadius * Math.sin(startAngle)] |
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
| """Proof of concept tornado/tulip integration. | |
| Works with the current development branch of both projects as of | |
| Jan 20. Current status: The tornado test suite passes cleanly | |
| on a tulip-backed IOLoop. The tornado-backed event loop for tulip | |
| supports the core call_later and add_reader method families, but not | |
| the higher-level networking methods. | |
| To run the tornado test suite on tulip, make sure both projects | |
| and this file are on your python path and run: |
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
| # Configuration file for varnish | |
| # | |
| # /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK | |
| # to be set from this shell script fragment. | |
| # | |
| # Should we start varnishd at boot? Set to "no" to disable. | |
| START=yes | |
| # Maximum number of open files (for ulimit -n) |