This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
MAX_PROCS=${1:-10}; | |
ispinner () { | |
i=1 | |
sp="/-\|" | |
while true; do | |
echo -en "\033[0;0f" | |
printf "\b${sp:i++%${#sp}:1}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- All commands assume 9.2 + | |
-- show running queries | |
SELECT pid, age(query_start, clock_timestamp()), state, waiting, usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' | |
AND query NOT ILIKE '%pg_stat_activity%' | |
AND state != 'idle' | |
ORDER BY query_start desc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import update_wrapper | |
from django.conf.urls import patterns, url | |
from django.contrib import admin | |
class BounceDetailedAdmin(admin.ModelAdmin): | |
subclass_model = None | |
def get_model_perms(self, request): |