Skip to content

Instantly share code, notes, and snippets.

@apps-online
apps-online / apontar_dominio_br.html
Created February 2, 2024 14:19
Passo a passo de como apontar um domínio para o IP do seu servidor utilizando o DNS do registro.br.
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head>
<title>Passo a passo de como apontar um domínio para o IP do seu servidor utilizando o DNS do registro.br</title>
</head>
<body>
<style type="text/css">
@page { margin: 2cm }
p { margin-bottom: 0.25cm; line-height: 120% }
h1 { margin-bottom: 0.21cm }
@apps-online
apps-online / about.md
Last active November 3, 2023 02:11
Receive Gmail emails through nodejs - node-imap - https://www.npmjs.com/package/node-imap
@apps-online
apps-online / nodemailer-gmail.md
Last active November 3, 2023 02:14
Nodemailer - Gmail | [pt-BR]

Nodemailer - Gmail | [pt-BR]

https://nodemailer.com

Para enviar e-mails de smtp.gmail.com, certifique-se de seguir estas 2 etapas:

  1. Em sua conta do Google, certifique-se de que a verificação em duas etapas esteja ativada.
  2. Em seguida, acesse https://security.google.com/settings/security/apppasswords . Clique em Selecionar aplicativo e escolha Outro (nome personalizado) no menu suspenso e clique em Gerar . Você receberá um código de 16 dígitos , este código deve ser usado como senha na configuração do e-mail e o usuário permanece como seu e-mail. Além disso, certifique-se de {seguro: verdadeiro}

Aqui está minha configuração:

@apps-online
apps-online / mount_drives_on_linux_boot.md
Created August 23, 2023 18:36
Automatically mount drives on Linux boot.

Automatically mount drives on Linux boot.

Add the following line to the file: /etc/fstab

UUID=bc82193c-2e33-4728-9ea7-a1c0124bf614 /mnt/storage ext4 defaults 0 0

To display your device's UUID, run the following command:

debian@debian:~$ su -
@apps-online
apps-online / sets_shell_interpreter_fish.md
Created August 23, 2023 18:24
Sets the "Fish" shell interpreter as the default. (Linux/Debian)

Sets the "Fish" shell interpreter as the default. (Linux/Debian)

chsh -s /usr/bin/fish

In case of "pam" error open the file "/etc/pam.d/chsh" and comment the line:

auth       required   pam_shells.so
@apps-online
apps-online / install_ffmpeg_libfdkaac.sh
Created August 23, 2023 18:13 — forked from rafaelbiriba/install_ffmpeg_libfdkaac.sh
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos:
#root@servidor:~# vi script.sh
#root@servidor:~# chmod +x script.sh
#root@servidor:~# ./script.sh
apt-get update
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
@apps-online
apps-online / set_samesite_cookie_to_none.md
Created August 23, 2023 17:35
Fix "set SameSite cookie to none" warning.
@apps-online
apps-online / git-ftp.md
Created August 23, 2023 17:14
git-ftp - Debian

git-ftp - (Linux/Debian)

apt install git-ftp

1) Set up a user by typing:

git config git-ftp.user 'FTPUserName'

2) Configure your server's FTP path:

@apps-online
apps-online / dns_config.md
Created August 23, 2023 17:06
DNS config.

DNS config

1 - Check the nsswitch.conf file

grep hosts /etc/nsswitch.conf

  • files = /etc/hosts

  • dns = /etc/resolv.conf

@apps-online
apps-online / google_spreadsheet.md
Created August 23, 2023 16:02
Google - Submit data from an HTML form to Google Sheets.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta charset="utf-8">
<title>Google Spreadsheet</title>
<style>
* {
  margin: 5px;