Skip to content

Instantly share code, notes, and snippets.

View mavikon's full-sized avatar

Maksim mavikon

  • USA
View GitHub Profile
@mavikon
mavikon / pgbouncer-schema.sql
Created August 13, 2019 09:00 — forked from petere/pgbouncer-schema.sql
views for accessing PgBouncer statistics via dblink
CREATE EXTENSION dblink;
-- customize start
CREATE SERVER pgbouncer FOREIGN DATA WRAPPER dblink_fdw OPTIONS (host 'localhost',
port '6432',
dbname 'pgbouncer');
CREATE USER MAPPING FOR PUBLIC SERVER pgbouncer OPTIONS (user 'pgbouncer');
-- customize stop
@mavikon
mavikon / index.html
Created April 16, 2018 04:58 — forked from minhman/index.html
html5
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
<meta name="author" content="Izwebz" />
<meta name="copyright" content="Licensed under GPL and MIT." />
<meta name="description" content="" />
@mavikon
mavikon / default nginx configuration file
Created April 16, 2018 04:58 — forked from skbr1234/default nginx configuration file
The default nginx configuration file inside /etc/nginx/sites-available/default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@mavikon
mavikon / mysql-docker.sh
Created March 24, 2018 07:57 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE