This file contains 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
#!/bin/bash | |
# This hook is run after every virtualenv is activated. | |
venv=`basename "$VIRTUAL_ENV"` | |
if [ -d "$HOME/src/$venv" ]; then | |
cd "$HOME/src/$venv" | |
fi |
This file contains 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
''' | |
Original here: https://github.com/mitsuhiko/flask/blob/master/flask/app.py#L1295 | |
''' | |
from flask import Flask | |
class MyFlask(Flask): | |
def log_exception(self, exc_info): | |
""" | |
Overriden to provide the full url (including scheme, hostname and query string) |
This file contains 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
Connecting | |
Traceback (most recent call last): | |
File "screenshot.py", line 16, in <module> | |
desired_capabilities=desired_capabilities, | |
File "/Users/daz/.virtualenvs/1a5c5f7263517393/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 63, in __init__ | |
self.start_session(desired_capabilities, browser_profile) | |
File "/Users/daz/.virtualenvs/1a5c5f7263517393/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 105, in start_session | |
'desiredCapabilities': desired_capabilities, | |
File "/Users/daz/.virtualenvs/1a5c5f7263517393/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 156, in execute | |
self.error_handler.check_response(response) |
This file contains 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
$ pip install flask blinker raven gunicorn gevent | |
... | |
$ gunicorn -k gevent test:app | |
2012-10-01 11:16:57 [62111] [INFO] Starting gunicorn 0.14.6 | |
2012-10-01 11:16:57 [62111] [INFO] Listening at: http://127.0.0.1:8000 (62111) | |
2012-10-01 11:16:57 [62111] [INFO] Using worker: gevent | |
2012-10-01 11:16:57 [62112] [INFO] Booting worker with pid: 62112 | |
2012-10-01 11:26:00 [62292] [ERROR] Error handling request | |
Traceback (most recent call last): | |
File "/Users/daz/.virtualenvs/b99e1a9fba3d9901/lib/python2.7/site-packages/gunicorn/workers/async.py", line 44, in handle |
This file contains 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
$ brew doctor | |
Your system is raring to brew. |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC | |
"-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>mac.bitlbee</string> | |
<key>ProgramArguments</key> | |
<array> |
This file contains 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
input { | |
file { | |
path => "/path/to/exception.log" | |
type => "magento_exception" | |
codec => multiline { | |
pattern => "^%{TIMESTAMP_ISO8601}" | |
negate => true | |
what => "previous" | |
} | |
} |
This file contains 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
Connected to 172.16.137.140. | |
220 pyftpdlib 1.0.0 ready. | |
Name (172.16.137.140:daz): bad | |
331 Username ok, send password. | |
Password: | |
421 Service not available, remote server timed out. Connection closed. | |
ftp: Login failed | |
ftp> |
This file contains 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
varnishlog -c -m TxStatus:503 #Log client (not backend) requests that result in a 503 being returned to a client |
This file contains 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
import salt.config | |
opts = salt.config.minion_config('/tmp/foo') # Doesnt need to be present | |
opts['file_client'] = 'local' # I dont know if this is right. Not 'remote' | |
opts['cachedir'] = '/tmp/salt' # Needs to be writeable | |
d = { | |
'/tmp/bacon': { | |
'file': [ | |
'directory', |