Skip to content

Instantly share code, notes, and snippets.

View vgaicuks's full-sized avatar

Vitālijs Gaičuks vgaicuks

  • Trialine
  • Riga, Latvia
View GitHub Profile
@Hakky54
Hakky54 / openssl_commands.md
Last active May 3, 2024 03:14 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@akhmadkresna
akhmadkresna / wkhtmltopdf.sh
Created June 30, 2018 14:11
wkhtmltopdf install on ubuntu 18.04
sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo apt-get install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
@rstacruz
rstacruz / README.md
Last active October 23, 2023 09:06
How to install Docker in Mac, Windows, and Linux

Getting Docker

Docker is available for Linux, MacOS, and Windows.

MacOS

Docker for Mac is best installed with Homebrew and Homebrew Cask. For other ways to install on MacOS, see Install Docker for Mac in Docker's docs.

brew cask install docker # Install Docker
@JustThomas
JustThomas / nginx_remove_double_slashes.md
Created February 4, 2018 17:16
nginx: Remove double slashes from URLs

Put the following directives in your server block. nginx will then redirect URLs with double (or triple or multiple) slashes to the corresponding URL with a single slash.

merge_slashes off;
rewrite ^(.*?)//+(.*?)$ $1/$2 permanent;
@lightonphiri
lightonphiri / bash-install_google_fonts_on_ubuntu.md
Last active May 8, 2024 17:14
Install Google Fonts on Ubuntu

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip

@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.

@plepe
plepe / gist:52ecc9f18efb32c68d18
Last active October 23, 2023 08:50
MDADM and LVM cheat sheet

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0
@esfand
esfand / nginxrewrite2.md
Last active March 10, 2024 05:56
Nginx Rewrite
@Stanback
Stanback / nginx.conf
Last active May 10, 2024 12:07 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
def verify_sign(public_key_loc, signature, data):
'''
Verifies with a public key from whom the data came that it was indeed
signed by their private key
param: public_key_loc Path to public key
param: signature String signature to be verified
return: Boolean. True if the signature is valid; False otherwise.
'''
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5