Skip to content

Instantly share code, notes, and snippets.

1 - Install Node/NPM
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
2 - git clone
git config --global user.name "xxx"
git config --global user.email "xxx@gmail.com"
ssh-keygen -t rsa -b 4096 -C "xxx@gmail.com"
or
@reematec
reematec / environment variable
Created January 22, 2024 06:18
Environment Variable directories
printenv
printenv | less
printenv VAR
export VAR="value"
sudo nano ~/.bashrc
export VAR="VALUE"
source ~/.bashrc
@reematec
reematec / mysql new user
Last active January 17, 2024 13:24
mysql new user
CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'new_user'@'localhost';
FLUSH PRIVILEGES;
--------------------------------------------------------------
GRANT CREATE, SELECT ON * . * TO 'user_name'@'localhost';
REVOKE PERMISSION_TYPE ON database_name.table_name FROM ‘user_name’@‘localhost’;
REVOKE ALL PRIVILEGES ON * . * FROM 'user_name'@'localhost';
DROP USER ‘user_name’@‘localhost’;
SHOW GRANTS FOR 'user_name'@'localhost';
@reematec
reematec / remove mysql completely
Last active January 17, 2024 13:23
Remove MySQL server completely
sudo apt remove mysql-server mysql-client
sudo apt autoremove
sudo apt autoclean
sudo rm -rf /etc/mysql
sudo rm -rf /var/lib/mysql
dpkg -l | grep -i mysql
----------------------------------
@reematec
reematec / linux ssh
Last active January 17, 2024 13:24
Linux SSH
git config --global user.name "xxx"
git config --global user.email "xxx@gmail.com"
ssh-keygen -t rsa -b 4096 -C "xxx@gmail.com"
# Generating public/private rsa key pair.
# Enter file in which to save the key (/home/amir/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
eval "$(ssh-agent -s)"