Skip to content

Instantly share code, notes, and snippets.

View jurka's full-sized avatar

Iurii Ogiienko jurka

  • Sentinel Software
  • Morrisville, NC, USA
  • 17:37 (UTC -05:00)
  • LinkedIn in/ogiienko
View GitHub Profile
WITH table_scans as (
SELECT relid,
tables.idx_scan + tables.seq_scan as all_scans,
( tables.n_tup_ins + tables.n_tup_upd + tables.n_tup_del ) as writes,
pg_relation_size(relid) as table_size
FROM pg_stat_user_tables as tables
),
all_writes as (
SELECT sum(writes) as total_writes
FROM table_scans
@jurka
jurka / policy.conf
Last active December 26, 2015 23:19 — forked from rbranson/crossdomain.conf
# Add this to your nginx.conf under http { }
server {
listen 843;
server_name localhost;
location / {
rewrite ^(.*)$ /crossdomain.xml;
}
@jurka
jurka / lxc-centos
Created September 23, 2013 10:05 — forked from hagix9/lxc-centos
#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.