Skip to content

Instantly share code, notes, and snippets.

@kirbysayshi
kirbysayshi / mass-aggregation-change.sh
Created November 23, 2011 17:14
quick examples of how to change many many wsp (graphite/whisper) files settings
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
@lgellert
lgellert / AutoSlugifyOnSaveModel.py
Last active January 2, 2020 06:43
Django 1.8x + compatible automatic slug creator abstract model
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.db import IntegrityError
from django.template.defaultfilters import slugify
class AutoSlugifyOnSaveModel(models.Model):
"""
# gunicorn config
CONFIG = {
# 'mode': 'wsgi',
'working_dir': '/usr/lib/python2.7/dist-packages/salt/netapi/rest_cherrypy',
# 'python': '/usr/bin/python',
'args': (
'--bind=0.0.0.0:8000',
'--workers=2',
'--timeout=600',
'--user=root',