Portions taken from http://www.cs.utexas.edu/~mitra/csSpring2011/cs327/cx_mac.html (in case that link ever dies.)
Assume you've got homebrew installed.
Download the following files from Oracle
DEBUG=True | |
LOG_FILE_SIZE=1024*1000 | |
LOGGING = { | |
'version' : 1, | |
'disable_existing_loggers':True, | |
'formatters' : { | |
'simple' : { | |
'format' : '%(levelname)s %(name)s %(message)s' | |
}, |
Portions taken from http://www.cs.utexas.edu/~mitra/csSpring2011/cs327/cx_mac.html (in case that link ever dies.)
Assume you've got homebrew installed.
Download the following files from Oracle
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash |
celery flower --address=127.0.0.1 --url_prefix=flower --broker=<broker url> |
#!/usr/bin/env python3 | |
import concurrent.futures.thread | |
import sys | |
import time | |
from concurrent.futures import ThreadPoolExecutor, as_completed | |
def remove_file(path): | |
print('Removing file %s' % path) |
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). | |
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and | |
# run `sudo service procps start` or reboot. | |
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit | |
# | |
# More information resources: | |
# -$ man inotify # manpage | |
# -$ man sysctl.conf # manpage | |
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use |
The idea here is that if you know which migrations were in version 2.0.3
of your project and which were in version 2.0.4
then setA - setB
gives you the list of migrations you need to undo.
Django migrations give you a directed acyclic graph which describes how to get from the current database state to the target state. But there is no mechanism by which you can perform tasks like revert all the migrations that just ran in the last deployment
.
Here is a quick recipe for batching Django migrations to allow you to do things like that.
Before you tag your project you do:
<div id="messages"> | |
{% for message in messages %} | |
<div {% if message.tags %}class="alert alert-dismissable alert-{{ message.tags }}"{% endif %}> | |
<a class="close" data-dismiss="alert" href="#">×</a> | |
{{ message }} | |
</div> | |
{% endfor %} | |
</div> |
/* | |
* Returns the value of a property in a nested object. | |
* | |
* @param {Object} sourceObject | |
* @param {string} dotNotationPath | |
* @returns {*} | |
* | |
*/ | |
function getPropValue(sourceObject, dotNotationPath) { |
"""gunicorn configuration file to export server metrics | |
To launch add `-c webapp/gunicorn_config.py` to the gunicorn command line. | |
Requires statsd to be configured for gunicorn as well, e.g. | |
`ENV STATSD_HOST=statsd-exporter:9125` | |
""" | |
# Python imports | |
import ctypes |