Skip to content

Instantly share code, notes, and snippets.

Avatar
🌀
Studing

Fabiano Santos Florentino fabianoflorentino

🌀
Studing
View GitHub Profile
@fabianoflorentino
fabianoflorentino / occlusterup.sh
Last active Mar 6, 2021 — forked from orcunuso/occlusterup.sh
Minimal OpenShift cluster
View occlusterup.sh
#!/bin/bash
IP_ADDR=$(ip addr |grep 172.16.252 |head -n1 |awk '{ print $2 }' |cut -d"/" -f1)
echo "${IP_ADDR} $HOSTNAME" >> /etc/hosts
# Install Docker latest. yum-utils package is required (which provides the yum-config-manager
# utility) in order to set up the docker stable repository. After install, we need to define
# docker network as insecure registry to prevent failure during cluster creation.
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
@fabianoflorentino
fabianoflorentino / LC_CTYPE.md
Created Oct 9, 2020 — forked from nicks9188/LC_CTYPE.md
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
View LC_CTYPE.md
  1. vi /etc/environment

add these lines...

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

Alternatively,

@fabianoflorentino
fabianoflorentino / mysql-docker.sh
Created Sep 28, 2020 — forked from nshtg/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE > backup.sql
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | gzip > backup.sql.gz
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | bzip2 > backup.sql.bz2
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
gunzip < backup.sql.gz | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
bunzip2 < backup.sql.bz2 | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
@fabianoflorentino
fabianoflorentino / git-deployment.md
Created Aug 20, 2020 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks
View git-deployment.md

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

View config
[user]
#
# Fonte: https://github.com/brauliobo/gitconfig/blob/master/configs/.gitconfig
#
# not good to force this globally, you should use the right name/email in each context
#email = brauliobo@gmail.com
#name = Braulio Bhavamitra
#email = braulio@eita.org.br
#name = Braulio Oliveira
#email = brauliooliveira@olery.com
@fabianoflorentino
fabianoflorentino / Dockerfile
Created Nov 30, 2019
Dockerfile to Apache2 on Alpine Linux
View Dockerfile
#
# Author: Fabiano Santos Florentino
# Version: 0.0.1
#
FROM alpine
RUN apk update \
&& apk add --no-cache apache2 \
&& adduser apache apache \
&& mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 \