This is a short tutorial on setting up munin to monitor your Django website on ec2.
We're gonna be using Nginx instead of apache here because it's more lightweight and popular between Django developers.
{ | |
"response": { | |
"meta": {}, | |
"data": { | |
"distance": 0, | |
"name": "北京", | |
"lat": 111, | |
"lng": 111, | |
"checkins": [ | |
{ |
{ | |
"response": { | |
"status": "success", | |
"meta": {}, | |
"data": { | |
"checkin": { | |
"time": 6, | |
"id": null, | |
"user": { | |
"username": "yy", |
echo "Kill processes containing '$1'" | |
ps aux | grep $1 | grep -v grep | awk '{print$2}' | xargs kill -9 |
// check if paths are in href | |
$('#nav a').ajaxlinks({ | |
ignore: ['.no-al', '.no-ajax', '#logo'], | |
ignore_paths: ['/accounts/', '/__debug__/'] | |
}); | |
// Or wildcard paths if it's not too hard to parse | |
$('#nav a').ajaxlinks({ | |
ignore: ['.no-al', '.no-ajax', '#logo'], | |
ignore_paths: ['*/accounts/*', '*/__debug__/'] |
from fabric.api import run, local, task | |
@task(alias='hd') | |
def heroku_deploy(scale='yes', runtime='no', runtime_version=None): | |
""" | |
Deploys heroku app | |
Usage examples: |
from django.conf import settings | |
from django.core.urlresolvers import is_valid_path | |
from django.http import HttpResponsePermanentRedirect | |
from django.middleware.locale import LocaleMiddleware | |
from django.utils import translation | |
from django.utils.cache import patch_vary_headers | |
class UpdatedLocaleMiddleware(LocaleMiddleware): | |
def process_response(self, request, response): |
Fork the repo and clone the fork into PipDiff:
git clone [email protected]:littlepea/pipdiff.git PipDiff
Test that the utility is working:
cd pipdiff/ ./pipdiff.py Django==1.4.5 PyPI:Django==1.5
<p>Drag this bookmarklet to your bookmarks bar to install:</p> | |
<a href="javascript:(function start_client(){newwnd=window.open("https://app.paymo.biz/timetracker/client.html","client","height=490,width=340,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes");if(!newwnd){alert("Turn off popup blocker to access this feature")}return false})();">Paymo Timer</a> | |
<p>Then each time you click it a popup window will open with your timer, no need to go to Paymo website first!</p> |
class Post(models.Model): | |
link = models.URLField(blank=True, null=True, db_index=True) # link is also unique identifier for each entry | |
updated = models.DateTimeField(blank=True, null=True, db_index=True) # last updated | |
published = models.DateTimeField(blank=True, null=True, db_index=True) #pubDate | |
title = models.CharField(max_length=250, blank=True, null=True) #short title, text without HTML | |
description = models.TextField(blank=True, null=True) #universal text/html representation of entry | |
class GoscaleCMSPlugin(CMSPlugin): | |
""" | |
Common base abstract class for all the GoScale plugins |