git log is one of most useful commands to see information about commit , author , date and subject(comment) while using GIT.This displays information in blocks and hardly 5 - 7 can be listed on normal screen size. But git provides --pretty option , so that we can format the output of git log; Here are some ways to do that ...
Still in my early days of using Git. Recently just to make sure that I have merged two branches and have pushed changes to QA server successfully,I often used command "find | xargs grep" .But to deal with this kind of situations Git provides "grep" command. Just as name suggests this commands searches for regex pattern passed to it. ...
Taking MYSQL dump is usual requirement in my project . And Since some of the tables in project are huge so often I have to take dumps of selected tables and often have to ignore some tables. since we had to do it frequently in our project so I created a script which does following for me. Takes database dump Takes dump of...
keyword "in" is used in Groovy to check whether element exists in Collection. Example List [groovy] String str = "this is me " List list = str.tokenize(" ") String word = "this" assert word in list == true assert "hello" in list == false [/groovy] Example with Set [groovy] Set set...
(Xdotool is a tool that simulates user key movements.) Usually when we start to work , we usually require some apps to be running. In my case I have to run a grails app, sql , subversion and IDE in different tabs of same terminal. Normally it would take almost 1-2 minutes if I do it manually.So I created a shell script using...
In one of our recent Grails project we had to provide support for Viewing Pdf even if end user's browser did not have any pdf viewer plugin or add on installed. So we decided that we would open our pdf on Google Doc's pdf viewer. This will behave in same manner as Gmail does , when it has a pdf as attachment to mail , It provides two...
In one of our grails project , we had to attach cover to Pdf file . But since some of pdf's uploaded were password protected. To handle this scenario we added bouncyCastle.jar , so our version of iText was able to handle password protected pdf . And Then to check whether pdf is password protected or not , we used "Boolean...
Auto complete .com Address Ctrl+Enter Auto complete .net Address Shift+Enter Auto complete .org Address Ctrl+Shift+Enter Back Alt+Left Bookmark All Tabs Ctrl+Shift+D Bookmark This Page Ctrl+D Bookmarks Ctrl+B Copy Ctrl+C Cut Ctrl+X Clear Recent History Ctrl+Shift+Del ...
Recently, we had a requirement where secure URLs were to be made accessible to Google. Our implementation was to send a url with token valid for 10 seconds. The token expired automatically after 10 seconds. We used time based cache for this as described here: T set max time to 10 seconds , I set default MaxAge to 10 millis in above...
Recently had a requirement to print Currency values with a condition that negative numbers must be inside brackets. It can be done by using pattern property in tag. the part before semicolon is for positive numbers and part following semicolon is for negative number. ____________________ Hitesh ...