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 October 10, 2026 11:53
Contribution guidelines, code of conduct and AI-assisted contributions

Contributing

Contributions are welcome: bug reports, documentation, accessibility improvements, tests and focused code changes all help. Small fixes can go directly to a pull request. For new features, removed functionality, architectural changes or breaking behavior, discuss the proposal in an issue first. Explain the problem and intended outcome before committing to an implementation.

Follow the repository's CONTRIBUTING.md, AGENTS.md, setup instructions and license notices. Repository-specific requirements take precedence over this general guide.

@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