Skip to content

Instantly share code, notes, and snippets.

@flockonus
flockonus / app.js
Created August 9, 2012 16:05
swig on express.js 3.0
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, http = require('http')
, path = require('path')
// !
, swig = require('./config/consolidate-swig').swig
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active November 20, 2024 11:35
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@jzempel
jzempel / pipdiff.py
Last active December 11, 2015 15:59
View a summary list of package release differences between your local environment and PyPI.
#!/usr/bin/env python
try:
from pip import get_installed_distributions
except ImportError:
from sys import exit
exit("pip not available")
from pkg_resources import parse_version