LF will be replaced by CRLF in git – What is that and is it important?

In Unix systems the end of a line is represented with a line feed (LF). In windows a line is represented with a carriage return (CR) and a line feed (LF) thus (CRLF). when you get code from git that was uploaded from a unix system they will only have an LF.

If you want to turn this warning off, type this in the git command line

git config core.autocrlf true

If you want to make an intelligent decision how git should handle this, read the documentation

Here is a snippet

Formatting and Whitespace

Formatting and whitespace issues are some of the more frustrating and subtle problems that many developers encounter when collaborating, especially cross-platform. It’s very easy for patches or other collaborated work to introduce subtle whitespace changes because editors silently introduce them, and if your files ever touch a Windows system, their line endings might be replaced. Git has a few configuration options to help with these issues.


If you’re programming on Windows and working with people who are not (or vice-versa), you’ll probably run into line-ending issues at some point. This is because Windows uses both a carriage-return character and a linefeed character for newlines in its files, whereas Mac and Linux systems use only the linefeed character. This is a subtle but incredibly annoying fact of cross-platform work; many editors on Windows silently replace existing LF-style line endings with CRLF, or insert both line-ending characters when the user hits the enter key.

Git can handle this by auto-converting CRLF line endings into LF when you add a file to the index, and vice versa when it checks out code onto your filesystem. You can turn on this functionality with the core.autocrlf setting. If you’re on a Windows machine, set it to true – this converts LF endings into CRLF when you check out code:

$ git config --global core.autocrlf true

If you’re on a Linux or Mac system that uses LF line endings, then you don’t want Git to automatically convert them when you check out files; however, if a file with CRLF endings accidentally gets introduced, then you may want Git to fix it. You can tell Git to convert CRLF to LF on commit but not the other way around by setting core.autocrlf to input:

$ git config --global core.autocrlf input

This setup should leave you with CRLF endings in Windows checkouts, but LF endings on Mac and Linux systems and in the repository.

If you’re a Windows programmer doing a Windows-only project, then you can turn off this functionality, recording the carriage returns in the repository by setting the config value to false:

$ git config --global core.autocrlf false


I faced this issue while I was removing huge list of files from a folder using
sudo rm -rf /folder/filename*

Take a count of file in the folder:
ls techlogs/ | wc -l

Upon googling found following command, that fixed my issue.

cd /folder
sudo find . -name 'filenames*'
Above command will list all files start with “filenames”

sudo find . -name 'filename-prefix*'| xargs rm 
Above command will delete all files start with “filename-prefix

Such as –

You have  huge files which file names started with ‘abc’, Then you will write the command –

sudo find . -name 'abc*'| xargs rm 


Google SMTP Server – How to Send Emails for Free

To use Gmail’s SMTP server, you will need the following settings for your outgoing emails:

  • Outgoing Mail (SMTP) Server: smtp.gmail.com
  • Use Authentication: Yes
  • Use Secure Connection: Yes (TLS or SSL depending on your mail client/website SMTP plugin)
  • Username: your Gmail account (e.g. user@gmail.com)
  • Password: your Gmail password
  • Port: 465 (SSL required) or 587 (TLS required)


If you face this kind of problem..Mysql Error 1055.. How to solve this

I solved this issue in two ways –

Solution 1: Remove ONLY_FULL_GROUP_BY from mysql console

Answer: First access in your database with mysql root user. Then run the following query-


Solution 2: Updating the Mysql query

Answer: To solve this issue permanently you have to update your query.

Update all group column by primary key of a table and Set multiple group by if there is any column which is not functionally dependent on columns in GROUP BY clause


Easy Codeigniter Installer – Install Made Easy

Easy Codeigniter Installer – Install Made Easy

Easy Code-igniter Installer is the really wonderful solution to install Code-igniter Application, Using Easy Code-igniter  installer you can install any types of code igniter application without any hassle.You do not need to look at coding but easy to install. This is compatible with code igniter Version 2.x and 3.x . You can complete all installation process within 1/2 minutes.

Please Look at Online Documentation


Main Features:

  1. 4 easy steps to install application
  2. Check server requirements, directories permissions
  3. Automatically creating database
  4. Secure from XSS, CSRF and SQL Injection
  5. PSR Standard Coding
  6. Code-igniter Version 2.x & 3.x Supported
  7. Fresh and Clean Code
  8. Well Documentation
  9. Initial Login information setup
  10. Modern and Responsive Design

How to remove index.php from Codeigniter Url

Do you want to remove index.php from codeigniter url?

I am telling you the way how can you do it..

Open config.php and do following replaces

$config['index_page'] = "index.php"


$config['index_page'] = ""

In some cases the default setting for uri_protocol does not work properly. Just replace

$config['uri_protocol'] ="AUTO"


$config['uri_protocol'] = "REQUEST_URI"


Please update your .htaccess file-

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

How to count data from multiple table in a single query

As a developer, We need to count rows  from multiple table in a single query.

In this tutorial, I will show you how can you do that –

I am writing it Codeigniter format, but you can use this query in procedural way.

$query = "SELECT (SELECT COUNT(id) FROM table1) AS num1,
(SELECT COUNT(id) FROM table2) AS num2,
(SELECT COUNT(id) FROM table3) AS num3";
$result = $this>db->query($query)->row();

You can also use where condition here to get more necessary info..