Skip to content

Instantly share code, notes, and snippets.

View eliskvitka's full-sized avatar
🏳️‍⚧️
Trans rights are human rights!

Elis Kvitka eliskvitka

🏳️‍⚧️
Trans rights are human rights!
  • Ukraine
  • 05:15 (UTC +03:00)
View GitHub Profile
@jkatz
jkatz / encrypt_password.py
Last active March 26, 2024 16:37
Methods to create password verifiers for PostgreSQL
# Copyright 2019-2022 Jonathan S. Katz
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@Clark-G
Clark-G / upgrade-postgres-9.5-to-11.md
Last active September 8, 2023 03:26 — forked from delameko/upgrade-postgres-9.5-to-9.6.md
Upgrading PostgreSQL from 9.5 to 11 on Ubuntu 16.04

TL;DR

Install Postgres 11, and then:

sudo pg_dropcluster 11 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
@gdamjan
gdamjan / ssl-check.py
Last active April 14, 2024 07:16
Python script to check on SSL certificates
# -*- encoding: utf-8 -*-
# requires a recent enough python with idna support in socket
# pyopenssl, cryptography and idna
from OpenSSL import SSL
from cryptography import x509
from cryptography.x509.oid import NameOID
import idna
from socket import socket
@tanji
tanji / logstash-ssl.md
Last active December 26, 2023 18:49
Creating SSL certificates for use with Logstash
  • Create the CA:
openssl genrsa -aes256 -out ca.key 4096
openssl req -key ca.key -new -x509 -days 7300 -sha256 -extensions v3_ca -out ca.crt
  • Create server certificate and key:
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr
@satwikkansal
satwikkansal / quotefancy.py
Created May 3, 2017 07:55
Quotefancy wallpapers scraper
import shutil
import os
import requests
from bs4 import BeautifulSoup
# USAGE: Add all the galleries that you want to be scraped in the list below
roots = ["https://quotefancy.com/motivational-quotes",
"https://quotefancy.com/inspirational-entrepreneurship-quotes",
"https://quotefancy.com/startup-quotes"]
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 12, 2024 16:05
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@subfuzion
subfuzion / curl.md
Last active May 9, 2024 18:17
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@yograterol
yograterol / gist:99c8e123afecc828cb8c
Created January 8, 2016 05:45
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" workaround
"gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" CentOS's and Fedora +22 workaround
Install `redhat-rpm-config`
$ sudo dnf install redhat-rpm-config
@0XDE57
0XDE57 / config.md
Last active April 18, 2024 04:36
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".