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 grails.org and downloaded the zip file and added it to /Users/<username>/.sdkman/archives/

To install the plugin, run 

 sdk install grails 2.5.4  

Done!

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 "Geez-1.zip" 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 http://scripts.sil.org/TECkitDownloads 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