I hereby claim:
- I am stefanfoulis on github.
- I am stefanfoulis (https://keybase.io/stefanfoulis) on keybase.
- I have a public key whose fingerprint is A1DC 0DA1 3DD4 3B95 6606 971C 4DA2 0ED6 A49D EE57
To claim this, I am signing this object:
| # -*- coding: utf-8 -*- | |
| from waffle import TEST_COOKIE_NAME, flag_is_active | |
| from waffle.middleware import WaffleMiddleware | |
| # FIXME: only works if TEST_COOKIE_NAME ends with the flag name | |
| TEST_COOKIE_PREFIX = TEST_COOKIE_NAME.split('%s')[0] | |
| class AlwaysWaffleMiddleware(WaffleMiddleware): |
| #!/bin/bash | |
| # devpi install for a dedicated ubuntu server with upstart | |
| # based on http://tim.freunds.net/blog/devpi.html | |
| # execute as root (sudo) | |
| set -ex # exit on error, print executed commands | |
| DEVPI_VENV=/opt/devpi | |
| DEVPI_USER=devpi |
I hereby claim:
To claim this, I am signing this object:
| class NoBulkDeleteAdmin(admin.ModelAdmin): | |
| def get_actions(self, request): | |
| actions = super(NoBulkDeleteAdmin, self).get_actions(request) | |
| del actions['delete_selected'] | |
| actions['delete_selected'] = ( | |
| NoBulkDeleteAdmin.no_bulk_delete, | |
| 'delete_selected', | |
| 'Delete Selected instances and delete docker instances.' | |
| ) | |
| return actions |
| # git push deis master | |
| Counting objects: 1, done. | |
| Writing objects: 100% (1/1), 186 bytes | 0 bytes/s, done. | |
| Total 1 (delta 0), reused 0 (delta 0) | |
| -----> Python app detected | |
| -----> No runtime.txt provided; assuming python-2.7.6. | |
| -----> Preparing Python runtime (python-2.7.6) | |
| remote: /tmp/buildpacks/heroku-buildpack-python/bin/compile: line 186: cd: /tmp/buildpacks/heroku-buildpack-python/vendor/setuptools-3.6/: No such file or directory | |
| -----> Installing Setuptools (3.6) | |
| remote: /tmp/buildpacks/heroku-buildpack-python/bin/compile: line 193: cd: /tmp/buildpacks/heroku-buildpack-python/vendor/pip-1.5.5/: No such file or directory |
| """ | |
| Do not rename the table for plugins in the first "create" migration. | |
| OR: if you do... make the create table statement only run if the table does not already exist. | |
| """ | |
| class Migration(): | |
| def forwards(self, orm): | |
| # ... | |
ssh -f -N -L 24800:server-hostname:24800 server-hostname)| eloquent | |
| saggy | |
| shabby | |
| lonely | |
| sexist | |
| obnoxious | |
| pleasant | |
| wonderous | |
| sleek | |
| slimy |
| find /var/lib/docker/containers/ -type f -name "*.log" -delete |
| # f is the File model | |
| f = filer.models.File.objects.get(...) | |
| # f.file is a django file field (for images it's an easy-thumbnails image field) | |
| f.file |