Directories on host machine:
-
/data/certbot/letsencrypt
-
/data/certbot/www
-
Nginx server in docker container
docker run -d --name nginx \
Directories on host machine:
/data/certbot/letsencrypt
/data/certbot/www
Nginx server in docker container
docker run -d --name nginx \
alias rando="cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20; echo;" | |
alias randoo="cat /dev/urandom | tr -dc '[a-zA-Z0-9-_+=]\/}{' | fold -w ${1:-20} | head -n 1" |
PROMPT="%B%K{7}MBP%k%b %F{70}➜%f %F{39}%~%f " |
IPTables is the Firewall service that is available in a lot of different Linux Distributions. While modifiying it might seem daunting at first, this Cheat Sheet should be able to show you just how easy it is to use and how quickly you can be on your way mucking around with your firewall.
The following list is a great set of documentation for iptables
. I used them to compile this documentation.
DELIMITER $$ | |
CREATE PROCEDURE clean_someTable() | |
BEGIN | |
REPEAT | |
DO SLEEP(1); | |
DELETE FROM xxx_table where status=2 LIMIT 100000; | |
UNTIL ROW_COUNT() = 0 END REPEAT; | |
END$$ |
<html> | |
<head> | |
<style> | |
body { | |
background: #222; | |
color: #fff; | |
position: relative; | |
text-align: center; | |
font-size: 1rem; | |
font-family: sans-serif; |
# 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 | |
[wsl2] | |
kernel=<path> # An absolute Windows path to a custom Linux kernel. | |
memory=<size> # How much memory to assign to the WSL2 VM. | |
processors=<number> # How many processors to assign to the WSL2 VM. | |
swap=<size> # How much swap space to add to the WSL2 VM. 0 for no swap file. | |
swapFile=<path> # An absolute Windows path to the swap vhd. | |
localhostForwarding=<bool> # Boolean specifying if ports bound to wildcard or localhost in the WSL2 VM should be connectable from the host via localhost:port (default true). | |
# <path> entries must be absolute Windows paths with escaped backslashes, for example C:\\Users\\Ben\\kernel | |
# <size> entries must be size followed by unit, for example 8GB or 512MB |
// AUTO GENERATE SIMPLE UNIQUE ID'S FOR NON-EMPTY ROWS | |
// | |
// Author: Carlos Perez, [email protected] | |
// | |
// Purpose: This Google Sheets script fires when any cell is edited and | |
// inserts a random (reasonably unique) UID of ID_LENGTH length | |
// into the specified ID_COLUMN. For instance if the first column in the | |
// sheet specified by SHEETNAME is the column where you would like the | |
// UID injected, then ID_COLUMN should be 1. | |
// |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"