Skip to content

Instantly share code, notes, and snippets.

View caiofrota's full-sized avatar

Caio Frota caiofrota

View GitHub Profile
Política de Privacidade
A sua privacidade é importante para nós. Esta Política de Privacidade descreve como coletamos, usamos e protegemos as informações pessoais que você fornece.
Informações Coletadas
Coletamos informações pessoais, como nome, endereço de e-mail e informações de contato, apenas quando fornecidas voluntariamente por você.
Uso das Informações
@caiofrota
caiofrota / Project EPIC Issues
Last active September 7, 2021 12:42
GitHub Temaples
Title: EPIC - <Milestone>: <Description>
--------------------------------------------------------------------------------
## EPIC
### Description
<Detailed Description.>
**Tasks:**
- [x] #2000
@caiofrota
caiofrota / cf_https_create_p12
Last active September 5, 2019 20:15
Setup Ubuntu server machine (with Apache2, PHP, MySQL, Java and Postfix) and useful scripts.
#!/bin/bash
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "Not running as root"
exit
fi
if [[ -z "$1" ]]; then
echo "Site must be informed"
exit
@caiofrota
caiofrota / CONTRIBUTING.md
Last active March 14, 2024 16:40
CONTRIBUTING.md

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@caiofrota
caiofrota / install-docker-elementary-loki.sh
Created February 25, 2018 16:29
Installs Docker on Elementary OS 0.4 (Loki)
#!/bin/bash
sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo rm -f /etc/apt/sources.list.d/docker.list
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -u -cs) \
stable"
sudo apt-get update
sudo apt-get purge lxc-docker
@caiofrota
caiofrota / regex_extract_string_separated_by_anything.txt
Last active November 24, 2017 19:40
Regex to extract strings separated by anything, ignoring the separator in double quotation marks.
Regex to extract strings separated by anything, ignoring the separator in double quotation marks.
("(.+)")|[^,]+ : Comma
("(.+)")|[^;]+ : Semicolon
("(.+)")|[^\.]+ : Dot
("(.+)")|[^\|]+ : Pipe
("(.+)")|[^\\]+ : Backslash
Explanation:
("(.+)") : Any string starting and ending with double quotation marks
@caiofrota
caiofrota / from_iso88591_to_utf8.sh
Last active November 24, 2017 19:40
Converting encoding with iconv command.
#!/bin/bash
for file in `find . -regextype posix-egrep -regex ".*\.(html|jsp|jspx|java|properties|xml|sql|pck|fnc|trg)"`; do
iconv -f ISO-8859-1 -t UTF-8 $file > $file.utf-8;
mv $file.utf-8 $file;
done