Posts

Showing posts from March, 2017

Dealing with line endings in GIT

In [ https://help.github.com/articles/dealing-with-line-endings/ ] Dealing with line endings MAC WINDOWS LINUX ALL If you're using Git to collaborate with others on GitHub, ensure that Git is properly configured to handle line endings. Every time you press  return  on your keyboard you're actually inserting an invisible character called a  line ending . Historically, different operating systems have handled line endings differently. When you view changes in a file, Git handles line endings in its own way. Since you're collaborating on projects with Git and GitHub, Git might produce unexpected results if, for example, you're working on a Windows machine, and your collaborator has made a change in OS X. Global settings for line endings The  git config core.autocrlf  command is used to change how Git handles line endings. It takes a single argument. On Windows, you simply pass  true  to the configuration. For example: git config --global core.

How to get the DB size in MySQL

How to get the DB size in MySQL SELECT table_schema, round(sum(data_length + index_length) / 1024 / 1024, 1) "MB" FROM   information_schema.tables where table_schema = database() -- the current schema GROUP  BY table_schema;

To convert DOS carriage returns into unix format

To convert DOS carriage returns into unix format Using vi, edit the file and set the option "ff "to "unix" :set ff=unix