Skip to content

Instantly share code, notes, and snippets.

View jurka's full-sized avatar

Iurii Ogiienko jurka

  • Sentinel Software
  • Morrisville, NC, USA
  • 17:26 (UTC -06: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

Keybase proof

I hereby claim:

  • I am jurka on github.
  • I am jurka (https://keybase.io/jurka) on keybase.
  • I have a public key ASC2fi2pIR_J85VSr2n_HJ6aL0XORAGjUM4_2vNrS-NLkAo

To claim this, I am signing this object:

@jurka
jurka / index.json
Last active January 20, 2016 10:54
test2
{
"features": [
{
"speakers": [
{
"files": [
],
"description": "Brandon Bloom has worn a variety of fancy hats for a variety of big companies, startups, non-profits, and consulting clients. His recent work<br>includes Code.org's Hour of Code campaign and CircleCI's ClojureScript-based frontend. When he's not-so-secretly applying computer science to business problems, he tinkers with languages, contributes to Clojure(Script) and builds other crazy things with Clojure.<br><br>",
@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:
@jurka
jurka / ec2-sethost.sh
Last active May 7, 2024 14:12
Setting domain name for AWS EC2 instance
#!/bin/bash
HOSTNAME=$1
IPV4=`/usr/bin/curl -s http://169.254.169.254/latest/meta-data/local-ipv4`
# Set the host name
hostname $HOSTNAME
echo $HOSTNAME > /etc/hostname
# Add fqdn to hosts file
@jurka
jurka / barber.go
Created January 25, 2013 14:27
Sleeping barber problem solution without Mutex and lock (http://en.wikipedia.org/wiki/Sleeping_barber_problem)
package main
import (
"time"
)
const (
BARBERS_AMOUNT = 1
HALL_SITS_AMOUNT = 3
)
#! /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.
@jurka
jurka / 10gen.repo
Created October 26, 2012 14:48
/etc/yum.repos.d/10gen.repo
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
@jurka
jurka / gist:3959219
Created October 26, 2012 14:45
/etc/yum.repos.d/nginx.repo
# nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1