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:
#!/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 |
eloquent | |
saggy | |
shabby | |
lonely | |
sexist | |
obnoxious | |
pleasant | |
wonderous | |
sleek | |
slimy |
# 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 |
from django.conf import settings | |
from django.utils.translation import string_concat, ugettext_lazy | |
from django.utils.html import strip_tags | |
from haystack import indexes, site | |
from cms.models.managers import PageManager | |
from cms.models.pagemodel import Page | |
from cms.models.pluginmodel import CMSPlugin |
from checks import AgentCheck | |
class FileDescriptorCheck(AgentCheck): | |
def check(self, instance): | |
with open('/proc/sys/fs/file-nr', 'r') as fobj: | |
fd_open, unknown, fd_max = fobj.read().split('\t') | |
self.gauge('system.fd_open', int(fd_open)) | |
self.gauge('system.fd_max', int(fd_max)) | |
self.gauge('system.fd_open_pct', float(fd_open)/float(fd_max)) |
sudo ditto -rsrc /Users/username /Volumes/OtherDisk/Users/ |
[buildout] | |
... | |
parts = | |
... | |
django-filer-git | |
[django-filer-git] | |
recipe=zerokspot.recipe.git | |
repository=git://github.com/stefanfoulis/django-filer.git | |
rev=c10e7e0b618b7718ae518ec33ecc8d5de6b62eaa |