Skip to content

Instantly share code, notes, and snippets.

@firdoussross
Last active July 18, 2016 04:35
Show Gist options
  • Save firdoussross/b2453359e9579414741e728ea81fbdca to your computer and use it in GitHub Desktop.
Save firdoussross/b2453359e9579414741e728ea81fbdca to your computer and use it in GitHub Desktop.

Useful commands that I always tend to forget.

BASH

Zip all folders individually to it's own archives

$ for dir in *; do tar -czf ${dir}.tar.gz ${dir}; done

MySQL

Create databse, user and grant privileges

create database DATABASE_NAME;
grant usage on *.* to DATABASE_USER@localhost identified by 'PASSWORD’;
grant all privileges on DATABASE_NAME.* to DATABASE_USER@localhost ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment