Posts

Mac OS Keyboard shortcuts for developers

As a developer, when I switched from Windows & Ubuntu OS to Mac OS, I struggled a lot to discover the shortcuts. The shortcuts are not very obvious as in Windows or Ubuntu. Hence I have compiled a list of shortcuts which I found very handy in Mac OS. General: Cmd + Space -> Spotlight search. Search/Open any app or files Cmd + Up Arrow -> Home key / Move to the start of the file Cmd + Down Arrow -> End key / Move to the end of the file Cmd + Left Arrow -> Go to start of current line Cmd + Right Arrow -> Go to end of current line Cmd + W -> Close current window or tab Cmd + Q -> Quit or close the application Cmd + Option + W -> Close all windows Cmd + M -> Minimise current window to the dock Cmd + H -> Minimise current window Cmd + Option + H -> Minimise all other application's windows Cmd + Tab -> Toggle between different applications Cmd + ` -> Toggle between windows in same application Cmd + Alt + D -> Show or Hide Do...

Bash Script Loops and Conditional statement examples

loops.sh conditionals.sh Sourcing functions in bash script

Bash Script Example

calculate.sh

Practical rsync command and options

Blazemeter Taurus load testing and offline jmeter html report

Recently I had used Blazemeter Taurus for load testing my application and I was quiet impressed with the features offered by Taurus. It is not a new tool by itself, instead it makes use of existing load testing tools like Apache JMeter or Gatling. However it offers enough abstraction to users from the underlying load testing tool using YAML configuration files. Advantages of using Taurus over JMeter 1) JMeter uses single jmx xml file to simulate the load test, which makes it hard for more than one person to work on the single jmx file and resolving conflicts might turn tricky 2) Easy to review changes made to the Taurus YAML file on commit by commit basis to understand the changes made to the load testing. This is especially handy during pull request process 3) Easy to run in non-interactive command line mode, so easy to integrate with CI tools 4) Official docker image provided by Blazemeter Taurus, which required minimal setup to run load test in development machines and also ...

JSON with curl and jq

This blog post captures some quick commands to deal with JSON from servers (Http APIs) using curl and jq command line tools About Jq: https://stedolan.github.io/jq/ Install jq: Mac: brew install jq Ubuntu or Debian: sudo apt-get install jq Sample JSON content: Assume the following JSON content will be returned from  URL http://api.example.com/some-json-content {     "user_name": "User 123",     "some_other_field": {         "sub_field": "sub_value"     },     "array_field": [         {             "field1": "value1",             "field2": "value2"         },         {             "field1": "value3",             "field2": "value4"         }     ] } UR...

Essential Heroku Commands for Java (Spring Boot) developers

This blog post captures the command used to create and configure java apps or spring boot apps deployed to Heroku Cloud. I use these commands in CI/CD deployment steps for continuous delivery and also to access the application's information from my local development machine. These commands are tested with Heroku Client version: heroku/7.0.33 darwin-x64 node-v10.0.0 View help heroku help Login/Logout to heroku With email and password heroku auth:login heroku auth:whoami heroku auth:logout Login/Logout to heroku With token # set HEROKU_API_KEY environment variable to login export HEROKU_API_KEY=<<API Key from https://dashboard.heroku.com/account>> heroku auth:whoami # unset HEROKU_API_KEY environment variable to logout unset HEROKU_API_KEY # clear the history to clear the API Key history -cw && cat /dev/null > ~/.bash_history Show available regions for deployment heroku regions Create an application heroku apps:create --app app-...