SELECT * FROM pg_stat_activity;
SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
Make Chromium accept self-signed certificates on localhost server.
- Arch
- Nginx
# Navigate to folder
cd /etc/nginx/ssl
# Become a Certificate Authority
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64, streams | |
import nimPNG | |
const b = """iVBORw0KGgoAAAANSUhEUgAAAXIAAAHtCAYAAAAEFPWfAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABcqADAAQAAAABAAAB7QAAAAAHJkeTAABAAElEQVR4AUS92XJjWZamt0mABAlwJjjPk9OniIwhszNVVV1VbS2ZabiRSX0pM11KDyDTdb+BnkPXMtNFm6lbnfMcER4+cp4ngDNIECAJ6vsW0kus9HIPd+CcffZe61//+tfa+7T8X//n//F0X39M5bOrdH1VTZn29vT48Jj86evpSfmOXGo0HlKtVk+1ur/uU09Pd3p8fEgHu0dp7dNm2t7aSU9PKT02GokPp2KxK/3bf/v3aX55PtX43M1tLZVKZ6m9rS21t7elyemJ1JnvTLc3ldS4f0jV6+tUr9bSzU011bnEcek87R4cpqVnS2lyYizdVW9S7e4+7R0cp9LZOdcfSIVCIbVnM2lgoC/18uv46CStbWzzb8XU19eT2rKtqb+nN52fnaWJyYk0NDzIM1S5f46xP6bz83N+b6RMpo1neky3t7epg2dta8vyCE/p4uwinZ+eptGh3lQ+PEh/+tOP6ezshudsSY2nBr/zwKmR5hanUnGoPxW6C6mnty/d8Czt7dnU092ZFhbm0tXldapWq2l4bDgdHR2njs6ulG1rTz98/2NaXFpIPV15rvWYLi8vuX8hjY3PpD//5a+pNT2l4+PjlGlpSYuLs2liYoTvl9L7j+sxnw+MvZPxTk1MpLubu7T6aY35u43n78jnUl9/T7q/u03V26vUkWtNi/MzaWR4IN3dVdP9PWvYzdxcXKaT45PUPziY2nLtqcD9b6+uUxtrMME8Nu6u0/BQX7pnPrKdhXT91JquavfpDvt45M+ra1uMbT4Njwym1OJcZlJifq64xtXVZ |
- Change your database RDS instance security group to allow your machine to access it.
- Add your ip to the security group to acces the instance via Postgres.
- Make a copy of the database using pg_dump
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
- you will be asked for postgressql password.
- a dump file(.sql) will be created
- Restore that dump file to your local database.
- but you might need to drop the database and create it first
$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
- the database is restored
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# INSPIRED BY PIHOLE. PLEASE SEE PIHOLE LICENSE FOR USE. | |
# Pi-hole: A black hole for Internet advertisements | |
# (c) 2017-2018 Pi-hole, LLC (https://pi-hole.net) | |
# | |
# PIHOLE FILE CAN BE FOUND AT https://install.pi-hole.net | |
# | |
# THIS FILE IS NOT PUBLIC DOMAIN AND MAY NOT BE USED. | |
# THIS IS A PRIVATE DEVELOPMENT FILE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# INSPIRED BY PIHOLE. PLEASE SEE PIHOLE LICENSE FOR USE. | |
# Pi-hole: A black hole for Internet advertisements | |
# (c) 2017-2018 Pi-hole, LLC (https://pi-hole.net) | |
# | |
# PIHOLE FILE CAN BE FOUND AT https://install.pi-hole.net | |
# | |
# THIS FILE IS NOT PUBLIC DOMAIN AND MAY NOT BE USED. | |
# THIS IS A PRIVATE DEVELOPMENT FILE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Custom date | |
_____________________*/ | |
$(function () { | |
formatDate("epochToDateHourInit", "YYYY-MM-DD HH:mm", false); | |
formatDate("epochToDateShortInit", "DD MMM", false); | |
formatDate("epochToDateExcelInit", "YYYY-MM-DD", false); | |
formatDate("epochToDateInit", "YYYY MMM DD", true); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (factory) { | |
/* global define */ | |
if (typeof define === 'function' && define.amd) { | |
// AMD. Register as an anonymous module. | |
define(['jquery'], factory); | |
} else if (typeof module === 'object' && module.exports) { | |
// Node/CommonJS | |
module.exports = factory(require('jquery')); | |
} else { | |
// Browser globals |