Rails irb is the console system which used by all Rails developers for testing purpose and debugging purpose. Every commands and actions are stored in the history. Usually the irb history path will be ~/.irb-history How to clear the irb history To clear the Rails console history, enough if we can clear the history file […]
Important commands to find size of the files and folders in linux
Some useful commands to find size of the files and folders in linux 1. To find the size of all partitions in the linux system 2. To find the total size of the folder 3. To find the largest files or folders from the selected folder 4. To find the total size by excluding specific […]
Alternate function for PHP nl2br in Ruby On Rails
In PHP, we have a pre defined function nl2br which converts newlines to <br/> tag. Unfortunately we don’t have a function in Ruby similar to nl2br. We have to create a user defined function. Example function for nl2br def nl2br(string) string = string.gsub(/(\r)?\n/, ” “) return string end Thats it. Happy Coding! Cover Image: Ruby […]
How to take backup of Tomboy notes
There are two ways to backup the tomboy notes Method 1 In tomboy application itself there is the option to export notes as html files. In the Menus >> Tools >> Export All Notes To HTML Now you can save the files in your desired path. But you cannot import this backup in another system […]
How to use regular expressions in PostgreSQL with examples
How to set cursor focus to the end of text in textbox using Javascript
This example will be helpful to set the cursor focus to the end of the string in the textbox. Also can reuse the function to set the focus to first character of the textbox. Happy coding!
How to Install PostgreSQL 9.6 in Fedora 30/31/32
This guide explains about, How to install PostgreSQL 9.6 in Fedora 30/31/32. As of now PostgreSQL supports its latest version PostgreSQL 12 in Fedora 32. But still if you wish to install PostgreSQL 9.6 because of your application/language compatibility, this step by step guide will help you. Step 1: Install PostgreSQL 9.6 Repo Installing this repo will […]

