Skip to content

Instantly share code, notes, and snippets.

Steve Bussetti sbussetti

Block or report user

Report or block sbussetti

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View shieldsmasher.sh
#!/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}"
@sbussetti
sbussetti / postgres_queries_and_commands.sql
Last active Feb 22, 2018 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- 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;
@sbussetti
sbussetti / options.py
Last active Dec 14, 2015
InheritedModelAdmin - model admin that redirects all requests to "subclass_model" attribute.
View options.py
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):
You can’t perform that action at this time.