Skip to content

Instantly share code, notes, and snippets.

View kra3's full-sized avatar
🤠
I may be slow to respond.

Arun Karunagath kra3

🤠
I may be slow to respond.
View GitHub Profile
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 24, 2025 09:49
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%'
@kra3
kra3 / discriptor_magic.py
Created April 17, 2012 22:09
ProxyProperty: Properties with proxy & instance varibale emulation
# -*- coding: utf-8 -*-
__author__ = "Arun KR (kra3) <[email protected]>"
__license__ = "Simplified BSD"
'''
Can be found at: https://gist.github.com/2409397
Public Clone URL: git://gist.github.com/2409397.git
Private Clone URL: [email protected]:2409397.git
'''
@kra3
kra3 / moveit_moveit.py
Created October 12, 2011 11:28
To keep your mouse busy, so you will be always online in IM even if you are not at desk.
__author__ = "Arun K Rajeevan (kra3)"
__copyright__ = "Copyright 2011-2012"
__license__ = "BSD"
__version__ = "2"
__email__ = "[email protected]"
__status__ = "Production"
import time
import ctypes
@kra3
kra3 / tictactoe.py
Created May 11, 2011 15:29
Retro "Tic Tac Toe" in python, wrote for fun
#! /usr/bin/env python
# All right reserved. Distributed Under BSD Lisence
__author__="Arun.K.R <[email protected]>"
__date__ ="$May 11, 2011 6:23:17 PM$"
import os, time
from random import choice
WIDTH = 3