Skip to content

Instantly share code, notes, and snippets.

@samayo
Last active Oct 12, 2019
Embed
What would you like to do?

mysql

# create user
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';    
# grant all privileges    
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';   
# flush privileges   
FLUSH PRIVILEGES;   
GRANT type_of_permission ON database_name.table_name TO ‘username’@'localhost’;    
REVOKE type_of_permission ON database_name.table_name FROM ‘username’@‘localhost’;   
SHOW GRANTS username;
DROP USER ‘username’@‘localhost’;

GIT

git revert #SHA
git commit --amend -m "Fixes bug #42" (before push)
git checkout -- #FILENAME (before commit/add)
git reset --hard #LAST-SHA (go to previous state : before commit/add) (--hard == no recovery)

CSS

height:60vmin; width: 19vmax

UBUNTU

sudo ufw disable
find / -iname "make" 2>/dev/null 

INSTALL Node/Npm/Npx

yum install -y gcc-c++ make
sudo curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
yum install nodejs
node -v 
npm -v 
npm i -g npx

docker stop/remove

docker stop $(docker ps -a -q)
winpty docker exec -it nginx bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment