CodeForLearning

Learning new technologies and solving the common issues
  • Home
  • How To
  • Linux
  • Programming
    • Ruby On Rails

How to clear Rails irb console history

Charles Doss
July 4, 2020
Programming, Ruby On Rails
3 Comments

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 […]

Read Post

Important commands to find size of the files and folders in linux

Charles Doss
July 4, 2020
How To, Linux
1 Comment

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 […]

Read Post

Alternate function for PHP nl2br in Ruby On Rails

Charles Doss
June 16, 2020
Ruby On Rails
12 Comments
rubyonrails

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 […]

Read Post

How to take backup of Tomboy notes

Charles Doss
June 16, 2020
Linux
3 Comments

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 […]

Read Post

How to use regular expressions in PostgreSQL with examples

Charles Doss
June 16, 2020
PostgreSQL
Comments
PostgresSQL 9.6

Introduction You may know already about the power of regular expressions in programming. It iis doing a great job in DBMS also. For me it is very helpful in PostgreSQL. I am sure you can use Regex in some other DBMSs also such as MySQL. Where can use it? Can be use it as alternate […]

Read Post

How to set cursor focus to the end of text in textbox using Javascript

Charles Doss
June 16, 2020
Programming, Javascript
1 Comment

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!

Read Post

How to Install PostgreSQL 9.6 in Fedora 30/31/32

Charles Doss
June 15, 2020
How To, Fedora, PostgreSQL
Comments
PostgresSQL 9.6

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 […]

Read Post
← Older Posts
Newer Posts →

Most Viewed Posts

  • Understanding about tracker and tracker-miner-f in linux.
  • How to setup GPG encryption key in KDE plasma
  • How to edit files using vi editor easily in linux
  • Installing KDE Plasma desktop environment instantly on Fedora 31
  • How to exclude files and folders when creating zip archive

Tags

AngularJS Concrete5 Fedora Flutter IntelliJ IDEA iOS 17 Javascript KDE LAMPP Linux Linux Commands Mac OS Openssl Pdfkit PostgreSQL RegEx Ruby On Rails svn Tail Teamviewer Tomboy Tracker-miner-f Vi Editor wkhtmltopdf XAMPP Xcode Zip Zoom
CodeForLearning © 2020  Disclaimer