You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
General rules
Follow standard conventions.
Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
Boy scout rule. Leave the campground cleaner than you found it.
Always find root cause. Always look for the root cause of a problem.
Some hosting providers like scaleway allows to remove the IPv4 from the VPS in order to save 1€/month
but doing this will result in losing connectivity to the "IPv4 world".
Or you may have ordered a VPS that only has IPv6 connectivity and you want to access to a resource only accessible from the "IPv4 world".
Here is how to gain your access back to the "IPv4 world".
Change your name servers(s) to DNS64 name servers(s)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create Bridge interface on the host and give internet access
sudo ip link add name br0 type bridge
sudo ip addr add 172.20.0.1/24 dev br0
sudo ip link set dev br0 up
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables --table nat --append POSTROUTING --out-interface enp3s0 -j MASQUERADE
sudo iptables --insert FORWARD --in-interface br0 -j ACCEPT
NSFilePromiseProvider with SwiftUI, to drag a file that's loaded asynchronously
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instalando o Cypress no WSL 2 (+ Usando o Puppeteer em testes)
Depois de muito tempo sofrendo, finalmente descobri como instalar o Cypress de forma limpa e tranquila no WSL2, e vou te ensinar, e além disso, quando você instalar aqui o Cypress, testes que usam o Puppeteer que é a mesma dependência que o Cypress usa, também passarão a rodar no seu WSL2!
Esse tutorial é muito útil se você está tendo o erro error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory ou algo parecido!
Antes de executar qualquer comando, ou código que eu tenha deixado aqui, tenta primeiro entender o que está escrito, e para os .sh, dê uma lida neles, mesmo que eu diga que seja seguro, é sempre bom olhar!