Skip to content

Instantly share code, notes, and snippets.

View josectheone's full-sized avatar

Jose Carlos josectheone

View GitHub Profile

Keybase proof

I hereby claim:

  • I am josectheone on github.
  • I am josectheone (https://keybase.io/josectheone) on keybase.
  • I have a public key ASCy54x8moX3CER5P8e0L_aimmnJLv9wVewuNrWL5yrLTwo

To claim this, I am signing this object:

The base16/Ethereum version of your address is: 0x6d3224d762Ab5A6E074006ed0106d171b65Ec701
--------------------------------------------------------------
--------------------------------------------------------------
3. Node - checking that your node is running
--------------------------------------------------------------
Your node is running using the bls public key: f6ae0db7b3016e8c524110073ae4929c474f0f869be1b9b05a2f6f6b7dec125e77b9753b6c76506f0aceeb82b0ef7813
Node is running and using the latest bootnodes: YES
@josectheone
josectheone / sendmail.txt
Created October 3, 2019 13:01
solve sendmail gmail auth in centos 7
yum install cyrus-sasl-md5 cyrus-sasl-plain cyrus-sasl-scram cyrus-sasl-ntlm cyrus-sasl-gs2 cyrus-sasl-gssapi
@josectheone
josectheone / smtp_relay.txt
Created October 3, 2019 13:04
Configure sendmail to use smtp relay
1. Create Auth File
First create directory for storing authentication files.
sudo mkdir /etc/mail/authinfo
sudo chmod 700 /etc/mail/authinfo
Now, create an auth file with any name like smtp-auth and add the following content. Replace the above email with your gmail or google apps email.
sudo vi /etc/mail/authinfo/smtp-auth
@josectheone
josectheone / backup.sh
Created October 14, 2019 11:25
Gdrive backup shell script
#!/bin/bash
# Set date variable
date=$(date +%Y%m%d-%H%M)
# Run mysqldump command inside mariadb container
docker exec -u root moodle_db bash -c 'mysqldump -u root -e -x -A | gzip > /bitnami/backup.sql.gz'
# Move backup file to backup directory
mv /var/lib/docker/volumes/moodle_db/_data/backup.sql.gz /opt/backups/backup-$date.sql.gz
@josectheone
josectheone / how_to.txt
Created October 14, 2019 11:35
Docker and UFW solution
1 - Add this lines to the end of /etc/ufw/after.rules
# BEGIN UFW AND DOCKER
*filter
:ufw-user-forward - [0:0]
:DOCKER-USER - [0:0]
-A DOCKER-USER -j RETURN -s 10.0.0.0/8
-A DOCKER-USER -j RETURN -s 172.16.0.0/12
-A DOCKER-USER -j RETURN -s 192.168.0.0/16
@josectheone
josectheone / jail.local
Created October 14, 2019 11:49
Fail2ban conf file
[sshd]
enabled = true
[INCLUDES]
before = paths-fedora.conf
[DEFAULT]
ignorecommand =
bantime = 60m
@josectheone
josectheone / Dockerfile
Last active October 19, 2019 23:29
Dockerfile - Golang com base Alpine
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache git ca-certificates tzdata && update-ca-certificates
RUN adduser -D -g '' appuser
ENV GO111MODULE=on
WORKDIR /app
@josectheone
josectheone / docker-compose.yml
Last active October 16, 2019 17:15
PostgreSQL + pgAdmin 4
version: '3'
services:
postgres:
container_name: postgresql
image: postgres:10
restart: always
environment:
POSTGRES_PASSWORD: "password"
ports:
@josectheone
josectheone / pldt-home-fibr-an5506-04-fa-rp2627-advanced-settings.md
Created November 4, 2019 22:51 — forked from kleo/backspace.md
PLDT HOME FIBR AN5506-04-FA RP2627 Advanced Settings

PLDT HOME FIBR AN5506-04-FA RP2627 Advanced Settings


[Notice]

Project moved to https://gitlab.com/kbeflo/fiberhomesuperadmin due to excessive amount of unicorns.
Gist here will not be updated anymore
Discussion here on Gist is still allowed but I strongly recommend going over to Gitlab or Discord chat