Sunday, August 7, 2016

Git: How to delete the last commit on remote

Let's say you accidentally commited a wrong commit to a branch or a commit to the wrong branch. What do you do?
Thankfully, Git allows you to delete the commit on remote.
Here is how.
 git pull origin mybranch  
 git reset HEAD^ --hard  
 git push origin-f mybranch  
More detailed info can be found here.

Friday, May 13, 2016

Grails - How to download zip manually and install using SDKMan

I tried to download the grails using SDKMan with:

 sdk install grails 2.5.4  
but it failed because of slow internet connection.

Then, I went directly to and downloaded the zip file and added it to /Users/<username>/.sdkman/archives/

To install the plugin, run 

 sdk install grails 2.5.4  


To see if the plugin is installed,

 sdk list grails  

Friday, April 15, 2016

How to convert Geez-1 font to Unicode

  1. Download the mapping files that were created for converting data to Unicode from Download "" and extract the zip file
  2. Download TECkit which is a low-level toolkit intended to be used by other applications that need to perform encoding conversions from for the platform/operating system you have and install it. You can find the installation notes from the same link.
  3. Go to command line/terminal/command prompt and follow instructions from Download "TECkitversion2_doc_pdf.pdf"

What I did is, I extracted the mapping files in 'Desktop' and put the file with Geez-1 font (to be converted) in 'Desktop' as well. Then, I run the following command in terminal.

txtconv -t Ge\'ez-1.tec -i ToBeConverted.doc -o Converted.txt

Note: I have seen that converting .doc (word documents) works better than .txt (plain text files).

Multiple datasource in Grails Services with SQL

Friday, July 10, 2015

How to debug Grails version greater than 2.4.4 in Intellij

Add the following to VM Options of the run configurations (locate the installation of grails)        

Tuesday, March 17, 2015

Solved: MySQL Issue Connection using old (pre-4.1.1) authentication protocol refused.

The following error occured when run `mysql` from the terminal to connect to a server.

mysqldump: Got error: 2049: Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled) when trying to connect
ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)

Add `--skip-secure-auth` to the end of the statement

mysql -h HostName -u UserName -pPassword DbName --skip-secure-auth

Wednesday, January 28, 2015

IntelliJ - the intelligent and best IDE for Java Based Projects (such as Grails)

Based on my personal experience, the advantages of using IntelliJ than other IDEs are:

  1. Support for frameworks and languages such as Grails, Groovy (and more)
  2. Support for debugging grails is amazing