- Open World
- Car-Shooter
HTTP_PROXY = { | |
"http": 'http://proxy.host:8888', | |
"https": 'http://proxy.host:8888' | |
} | |
def create(self, stanza, passwd): | |
''' | |
send xml data to ripe | |
return True on succes or HTTPError on error |
┌─[10:15:19] michel@PC12-331 | |
└─~/tmp› cat fabfile.py | |
import fabric.api as fab | |
fab.env.roledefs['staging'] = ['bbs-evolution.ipsw.dt.ept.lu'] | |
fab.env.roledefs['prod'] = ['bbs-arbiter.ipsw.dt.ept.lu'] | |
@fab.task |
When using a non-standard id attribute, flask-login does not seem to work. See also pallets-eco/flask-security#472
This gist contains two examples. One is working, the other one isn't. To test, run the app and go to http://localhost:5000
Login: admin@example.com Password: admin
When using working.py
, you should see an 'OK' message.
When using broken.py
the login will simply not work, and you'll be presented with a new login page.
from time import sleep | |
import logging | |
LOG = logging.getLogger(__name__) | |
def every_5_seconds(): | |
LOG.info('Running every 5') | |
I hereby claim:
- I am exhuma on github.
- I am exhuma (https://keybase.io/exhuma) on keybase.
- I have a public key whose fingerprint is 033C FABB FBCE 2387 C88D E243 8C72 CFB3 4D7E BB44
To claim this, I am signing this object:
I've tried upgrading from Flask 0.10.1 to 0.12 today and ran into a little issue:
I am maintaining a larger application which also provides a JSON API on top of a subset of it's functionalities via Flask. In order to make error handling consistent I defined a simple mixin class:
class RestExceptionMixin(object):
"""
Mixin for exceptions which can be used in a REST API.
"""
status_code = 400
import logging | |
import re | |
P_REQUEST_LOG = re.compile(r'^(.*?) - - \[(.*?)\] "(.*?)" (\d+) (\d+|-)$') | |
LOG = logging.getLogger('werkzeug') | |
def colorize_werkzeug(): |
""" | |
Example for a colourised logging output. | |
This example uses "blessings" to handle console escape sequences. ``blessings`` | |
itself is a very harmless package in that it does not have any external | |
dependencies. And it's code-base is very clean and small. | |
The example extends the core logging formatter (logging.Formatter) and | |
colourises the complete line. This takes advantage of any upstream updates | |
related to logging. When writing this against Python 2.7, the parent code |
This service is used as an example to demonstrate the Chromium issue described at https://bugs.chromium.org/p/chromium/issues/detail?id=773654
It does not use any external dependencies. To run this, simply follow theses steps:
go build server.go
./server
This will run a HTTP server on port 8080. To test the issue, open the page with Chromium, open the developer tools network tab and reload the page. Upon loading