Skip to content

Instantly share code, notes, and snippets.

@cinco
cinco / letsencrypt_tls_manual.md
Created July 18, 2022 22:26 — forked from cpburnz/letsencrypt_tls_manual.md
Manually Request Let's Encrypt TLS Certificate with certbot

Manually Request Let's Encrypt TLS Certificate with certbot

A TLS certificate can be manually requested from [Let's Encrypt][1] using [certbot][2]. In order to successfully acquire the certificate you will need to have a domain name properly set up through DNS, and you need to be able to make a file available from an arbitrary URL under your domain.

TL;DR

@cinco
cinco / .env
Last active July 28, 2023 04:20
Postal - Clear Held with python
POSTAL_LOGIN=your-email
POSTAL_PASSWORD=your-pass
POSTAL_URL=http://your-postal-domain
POSTAL_ORGANIZATION=slug-of-your-organization
POSTAL_MAIL_SERVER=slug-of-mail-server
@cinco
cinco / ftp-sync.sh
Created August 24, 2021 22:27
Sync between two FTPs
#!/bin/bash
DEST_DIR=$(mktemp -d /tmp/ftp-sync-XXXX)
FTP_ORIGIN_HOST=
FTP_ORIGIN_USER=
FTP_ORIGIN_PASS=
FTP_DESTINATION_HOST=
FTP_DESTINATION_USER=
@cinco
cinco / my.cnf
Created December 18, 2020 17:18 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@cinco
cinco / move-docker-vol.sh
Last active June 23, 2020 21:56
move volume container to another docker host
#!/bin/bash
docker run --rm -v $SOURCE_DATA_VOLUME_NAME:/from alpine ash -c "cd /from ; tar -cf - . " | ssh $TARGET_HOST 'docker run --rm -i -v $TARGET_DATA_VOLUME_NAME:/to alpine ash -c "cd /to ; tar -xpvf - " '
# before run export vars
# export SOURCE_DATA_VOLUME_NAME= && export TARGET_HOST=hostdestino && export TARGET_DATA_VOLUME_NAME=
@cinco
cinco / dominios-testa.bash
Created May 6, 2020 04:33
testa dns dominios
#!/bin/bash
for n in $(cat lista-dominios.txt )
do
echo "Resposta DNS para $n"
dig -t A "$n""
done
@cinco
cinco / dockergrep.sh
Created March 12, 2020 15:32 — forked from roylee0704/dockergrep.sh
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container
version: '3.6'
services:
pma:
container_name: recover_phpmyadmin
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: db
PMA_PORT: 3306
MYSQL_ROOT_PASSWORD: "senharootmariadb"
@cinco
cinco / gist:e1b9eb9008de3656c09c1241a775cf8e
Last active February 24, 2020 04:55
bloqueio escola de dados
create blacklist hash:ip family inet hashsize 4096 maxelem 65536
add blacklist 64.31.6.94
add blacklist 64.31.6.186
add blacklist 208.115.237.10
add blacklist 64.31.33.158
add blacklist 37.106.87.228
add blacklist 167.114.191.207
add blacklist 208.115.237.106
add blacklist 142.93.3.161
add blacklist 64.31.34.42