Skip to content

Instantly share code, notes, and snippets.

View GeorgiyDemo's full-sized avatar

Demka GeorgiyDemo

View GitHub Profile

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@GeorgiyDemo
GeorgiyDemo / install-poppler-ubuntu.md
Created October 16, 2018 16:09 — forked from Dayjo/install-poppler-ubuntu.md
How to install Poppler on Ubuntu

First install all these prerequisites for compiling:

sudo apt install g++ autoconf libfontconfig1-dev pkg-config libjpeg-dev libopenjpeg-dev gnome-common libglib2.0-dev gtk-doc-tools libyelp-dev yelp-tools gobject-introspection libsecret-1-dev libnautilus-extension-dev

First download the encoding files (no need to compile these) to the current working directory

wget https://poppler.freedesktop.org/poppler-data-0.4.7.tar.gz
import pyautogui
import time
import random
time.sleep(5)
while True:
pyautogui.moveRel(100, 0)
time.sleep(1)
pyautogui.moveRel(0, -100)
time.sleep(1)
@GeorgiyDemo
GeorgiyDemo / pg_stat_statements.sql
Created July 13, 2022 21:09
Check performance of Postgres DB via pg_stat_statements lib
SELECT
substring(query, 1, 50) AS short_query,
round(total_exec_time::numeric, 2) AS total_exec_time,
calls, round(mean_exec_time::numeric, 2) AS mean,
round ((100 * total_exec_time / sum(total_exec_time::numeric) OVER ())::numeric, 2) AS percentage_overall
FROM pg_stat_statements
ORDER BY total_exec_time DESC
LIMIT 35;