Skip to content

Instantly share code, notes, and snippets.

View dzubchik's full-sized avatar

Dmytro Dzubenko dzubchik

View GitHub Profile
### Keybase proof
I hereby claim:
* I am dzubchik on github.
* I am dzubchik (https://keybase.io/dzubchik) on keybase.
* I have a public key ASDGZa2nP3ZF56KQ5gph7unLHssMJAunwJCoQ70K6ZkXwgo
To claim this, I am signing this object:
@dzubchik
dzubchik / whiteboardCleaner.md
Created June 12, 2017 10:23 — forked from lelandbatey/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@dzubchik
dzubchik / postgres_queries_and_commands.sql
Created February 9, 2017 08:55 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), 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(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'