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></title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
| <script> | |
| // coolshell api | |
| function xss_ajax(url, callback) { | |
| var script_id = null; | |
| var script = document.createElement('script'); |
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 collections import namedtuple | |
| from pymongo import MongoClient | |
| from flask import request | |
| from core.web.site import app | |
| from core.web.site.views_master import * | |
| import json | |
| ''' | |
| $('#companies').dataTable( { | |
| "bProcessing": true, |
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
| 1. pip install -r reqs.pip | |
| 2. server.py | |
| 3. open client.html in browser | |
| 4. redis-cli publish push '123456' | |
| 5. check browser console |
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 | |
| """This is a demonstration of sharing file descriptors across processes. | |
| It uses Tornado (need a recent post-2.0 version from github) and the | |
| multiprocessing module (from python 2.6+). To run it, start one copy | |
| of fdserver.py and one or more copies of testserver.py (in different | |
| terminals, or backgrounded, etc). Fetch http://localhost:8000 and | |
| you'll see the requests getting answered by different processes (it's | |
| normal for several requests to go to the same process under light | |
| load, but under heavier load it tends to even out). |
NewerOlder