Skip to content

Instantly share code, notes, and snippets.

@malkinfedor
malkinfedor / script.sh
Created September 3, 2021 09:59 — forked from vielhuber/script.sh
PostgreSQL: Backup and restore export import pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux
@malkinfedor
malkinfedor / run.py
Created August 3, 2021 15:51 — forked from vulcan25/run.py
psycopg2 flask implementation with connection pooling support
from flask import Flask, g, jsonify
import werkzeug, os
from werkzeug.utils import secure_filename
import psycopg2
from psycopg2 import pool
def get_db():
print ('GETTING CONN')
if 'db' not in g:
@malkinfedor
malkinfedor / jenkins-elkstack.md
Created July 5, 2019 06:39 — forked from michaellihs/jenkins-elkstack.md
ElasticSearch, Logstash & Kibana for Jenkins Logs
@malkinfedor
malkinfedor / BusyApp.java
Created May 31, 2019 06:51 — forked from sjednac/BusyApp.java
JVM monitoring in a Docker environment
public final class BusyApp {
public static void main(String []args) throws Exception {
final java.util.Random generator = new java.util.Random();
while (true) {
generator.ints(1000000, 0, 100).sorted();
Thread.sleep(5000L);
}
}
}
@malkinfedor
malkinfedor / github.css
Created February 14, 2019 08:27 — forked from theconektd/github.css
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {