Skip to content

Instantly share code, notes, and snippets.

@saniaky
saniaky / Readme.md
Last active June 24, 2024 07:31
Docker + nginx-proxy + let's encrypt + watchtower + fail2ban

Complete solution for websites hosting

This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.

Features:

  • Automatically detect new containers and reconfigure nginx reverse-proxy
  • Automatically generate/update SSL certificates for all specified containers.
  • Watch for new docker images and update them.
  • Ban bots and hackers who are trying to bruteforce your website or do anything suspicious.
@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active June 27, 2024 07:07
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@WaximeA
WaximeA / change_definer.md
Last active February 13, 2022 22:15
Change sql script definers before a local magento database import

How to change the sql script's definers before a local magento database import :

  1. First, you have to open your terminal ;)

  2. You have to install homebrew if it's not already done :

$ brew install grep

  1. Once homebrew downloaded, just enter this command in a terminal :
@prestarocket
prestarocket / .gitignore
Last active July 19, 2023 16:04
Gitignore PrestaShop 1.7
# Cache, temp and personal files
/.htaccess
*.log
npm-debug.log.*
.sass-cache/
/cache/*
download/*
/img/*
/log/*
@Saleh7
Saleh7 / postfix-dovecot.sh
Created July 9, 2016 03:57
Ubuntu 14.04 Server Automated Bash script install and configure / Postfix / Dovecot / with mysql https://github.com/Saleh7/Scripts/blob/master/postfix-dovecot.sh
#!/bin/sh
#################################################################################
# Ubuntu 14.04 LTS Server #
# Automated Bash script install and configure / Postfix / Dovecot / with mysql #
# By https://github.com/Saleh7 #
# https://github.com/Saleh7/Scripts/blob/master/postfix-dovecot.sh #
#################################################################################
# Edit here ..
mysqlPass='PasswordRoot' # mysql root password here
@JonathanPorta
JonathanPorta / dd-examples.md
Last active June 23, 2024 00:58
DD Backup, Compress, and Restore

Backup/Image

Make sure the if value is correct! If doing this over SSH then open a TMUX session first... or else...

dd if=/dev/YOUR-DEVICE conv=sync,noerror bs=64K | gzip -c  > /home/portaj/macbook.img.gz

NOTE: You might not want to compress the image. It just means you have to uncompress it later to mount it. If you're planning to access the data soon, or frequently, don't compress it.

Saving a copy of the drive geometry

Save it in the same directory as the compressed image so later on if you decide you want to mount or extract data from the image you can see the partition structure without having to decompress the whole image. There might be some other ways to mount a compressed image.