Tuesday 30 July 2019

Login Postgresql with specific database

$  psql -d db_name -U username

e.g. $  psql -d on_store_development -U postgres

then it will ask for password default is root or postgres. Or check your database.yml for a password that password you have to type here.

Tuesday 23 July 2019

Get array of files from directory in rails

Dir.glob("#{Rails.root}/public/reports/*")

Revert last commit or second last and more....

 Git revert commit_id -m 1 this command willl revert last commit  Git revert commit_id -m 2 this command will revert second commit with same...