Showing posts from May, 2020

Revert pushed commit from git

There are 2 way to revert pushed code using git commands 1) First Way, Let suppose your current branch name is staging and you want to revert commit from staging git log   you will see commit details   now git checkout <commit_hash_where_you_want_to_point_your_head>                 in this picture i want to remove 1st commit                 so my command will be git checkout a804a3c4662334b0aa33860548841db54fb508bb         3. Now Head will be on second commit so create new branch from here git checkout -b staging_copy (name will be depends on you)      4. Now staging_copy branch does not have reverted commit, means its code is clean       5. Now delete your staging branch from local machine git branch -D staging    6. now rename your staging_copy branch to staging git branch -M staging    7. now we need to force push to staging branch git push origin staging -f This process is lengthy and complex but we are using this because in this proc

cannot find module angular http

npm install @angular/http@latest

How to Access RabbitMQ Management Plugin rabbitmqadmin Command Line

1) Enable rabbitmq_management   sudo rabbitmq-plugins enable rabbitmq_management 2) Restart rabbitmq-server sudo service rabbitmq-server restart 3) Access GUI http://rabbitmq-server-ip:15672/ username:guest password:guest //you can check ip sudo service rabbitmq-server status command 4) Access  rabbitmqadmin Command Line http://rabbitmq-server-ip:15672/cli a) Download  rabbitmqadmin script wget http://rabbitmq-server-ip:15672/cli/rabbitmqadmin b) Change permission chmod +x rabbitmqadmin 5) rabbitmqadmin Commands a) Help ./rabbitmqadmin --help b)List all exchanges ./rabbitmqadmin -u guest -p cloud -H localhost list exchanges -u : username -p : password c) List all queues   ./rabbitmqadmin -u guest -p cloud -H localhost list queues d) Get help of subcommands ./rabbitmqadmin help subcommands ./rabbitmqadmin help subcommands | grep queue ./rabbitmqadmin help subcommands | grep exchnage ./rabbitmqadmin help subcommands | grep binding