How to return a value from bash function
Returning a variable from functions in bash script can be little tricky. Bash functions are not similar to functions in other languages but these are read more
How to sort using a specific field on Linux
Sometime we need to sort a file on a specific field. This may be useful if a file is in csv or tsv formart (probably read more
Impact on LC_ALL on Linux sort
Linux sort is a handy Linux command line tool to sort text files. It can sort fairly large files without consuming too much memory. The read more
How to show environment variable for a process id (pid)
Sometimes it may be useful to see what environment variables were passed to a process. e.g. you may want to see LC_ALL value for a read more
How to specify environment variable for a command on Linux
Sometime we need to run a command with specific environment variables. These can be either just needed for the command or for the whole bash read more
How to add more DNS servers to Wi-Fi interface on Mac
When you are using WiFi or wired network using home broadband or mobile hotspot, you are assigned a default DNS server. It sometimes may be read more
DIG quick start tutorial for DNS Lookup
Dig (Domain information groper) can be used to do DNS lookup on Linux, Mac or windows machine. It will connect a DNS server (default or read more
How to transfer android apk using adb
Android debug bridge (adb) can be used to transfer an apk from mobile to computer over usb port. This can be useful when you are read more
How to download apk from mobile using AirDroid
Sometime we need to transfer the apk from android mobile to computer. This can be needed in case you wish to inspect the content of read more
Git – how to undo last commit
Sometime we need to undo last commit in git. This is fairly useful to undo a change made accidentally. Here are quick instructions to do read more
How to take screenshot on android phone
Often we need to take screenshot of what is displayed on android phone. This can be used in many ways. E.g. to capture a web read more
How to view your WiFi password on Mac
Sometime we connect to a Wi-Fi on Mac and then later forget the password we entered earlier. It can be easily viewed on Mac if read more
How to view wifi connection speed on Mac
When you setup your wifi router and you mac is connected to it, you may want to know what is wifi link speed (the bandwidth read more
How to change computer display name on Mac
Display name on Mac device can decide how your Mac appears on network and at other places like command line shell. Mac display name can read more
Mac Finder – how to change default folder
Finder app on Mac when opened start with a default folder. Sometimes it opens “all my files” which takes somewhat long time to display. You read more
How to remove hard drive icon from mac desktop
Mac shows some icons by default on desktop including hard drive. In case you want to save space and keep desktop tidy, you can remove read more
How to recover svn lost password on Linux
If you are using simple web auth to connect to svn server, you can choose to store it at client side. This way you don’t read more
How to enable usb debugging on android
Debugging on Android phone requires USB debugging to be enabled on Android. This lets you install apk through USB and also run adb shell on read more
How to clear default app on android
Android can set a default app for a certain file type or action (e.g. click on a url). When you click on a link for read more
How to insert multiple rows in google sheets
Sometime we need to insert multiple rows in Google Sheets. We can always insert one at a time by right clicking and then clicking insert read more
How to change default chrome search engine
Its pretty convenient to search by directly typing a keyword in Google chrome address bar. You can set Google or some other search engine as read more
How to delete files starting with dash/hyphen
Deleting files starting with dash or hyphen can be little tricky as dash is interpreted as option prefix on Mac and Linux. Here is what read more
Mac – open a terminal from a folder
Sometimes we want open Mac terminal from a specific folder which should automatically change directory to that folder. This can be achieved in Mac by read more
Mac terminal – how to close shell on exit
It is somewhat tedious to close a terminal window shell manually after the shell exit. By default Mac terminal does not close the shell on read more
Setup xdebug for remote wordpress debugging
Using xdebug is pretty useful for debugging and sometimes understanding existing code. In a typical setup where wordpress in installed remotely on EC2 or any read more
Mac – how to open apps not from App Store
By default security settings of Mac does not allow apps by unknown developers not downloaded from app store to be opened by double clicking on read more
How to remove xmlrpc from wordpress headers
If you don’t need xmlrpc in your wordpress, you can disable it at various places like http x-pingback header, html meta tags, etc. Here are read more