Skip to content

Instantly share code, notes, and snippets.

View italosantana's full-sized avatar
🎯
Focusing

Ítalo S. italosantana

🎯
Focusing
View GitHub Profile
@italosantana
italosantana / lunarvim commands
Last active February 17, 2023 11:59
I'm documenting my lunarvim commands.
> create new file
rm remove file
u: undo
ctrl + r: redo
:!mv {current_file} {new_name}
shift+tab -> switch open tabs
dd -> delete line
gcc -> comment line
shift + up arrow -> faster to up page
shift + down arrow -> faster to down page
#content {
position: relative;
}
#content img {
position: absolute;
top: 0px;
right: 0px;
}
You first check out for the name of the package you want to remove:
dpkg --list
Then remove the given package
sudo apt-get remove package_name
Purge any related code
@italosantana
italosantana / gist:8ce873bc3f35d87d64c98de1ce2d8c2a
Created October 25, 2022 17:32
custom link to open your gmail by link and seach email by email filter
https://mail.google.com/mail/u/youremail@gmail.com/#search/from:notifications@contato.com

In case, you have branch's conflict and don't want the commits caused by conflicts.

You are using the branch called "feat/api" and when switching, this error appears.

Switched to branch 'feat/api' Your branch and 'origin/feat/api' have diverged, and each has 2 and 5 submissions, respectively. (use "git pull" to merge the remote branch into yours)

@italosantana
italosantana / Error: ENOSPC: System limit for number of file watchers reached
Created September 9, 2022 14:03
System limit for number of file watchers reached
1. Check your actual limit
$ cat /proc/sys/fs/inotify/max_user_watches
2. Adjust your new limit in the file /etc/sysctl.conf:
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
The above command added the line "fs.inotify.max_user_watches=524288" to the /etc/sysctl.conf file and then asked the kernel to reload the new settings.
3. Check again your new actual limit
$ cat /proc/sys/fs/inotify/max_user_watches
# CURL
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
# CURL
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# GERAR O SCRIPT
source ~/.bashrc
# PERGUNTAR QUAIS VERSOES ESTAO DISPONIVEIS
## O docker-compose up irá rodar o docker compose, baseado em nosso docker-compose.yaml e com o -d o container é inicializado em segundo plano e podemos utilizar o nosso terminal para outros comandos.
docker-compose up -d
## Listar todas os últimos containers
docker container ls -a
## Iniciar container
docker container start <container_id>
## Parar container
@italosantana
italosantana / border outline in TextField in MUI
Created July 14, 2022 13:21
In case you have <TextField... in Material UI and have a border
<TextField
placeholder=""
fullWidth
multiline
rows={7.5}
maxRows={Infinity}
/>
function WalletBalance() {
const [balance, setBalance] = useState();
const getBalance = async () => {
const [account] = await window.ethereum.request({ method: 'eth_requestAccounts' });
const provider = new ethers.providers.Web3Provider(window.ethereum);
const balance = await provider.getBalance(account);
setBalance(ethers.utils.formatEther(balance));
}