What does “!eol” in gitattributes do?

Git has 2 attributes that deal with end-of-lines: text Documentation says: This attribute enables and controls end-of-line normalization. When a text file is normalized, its line endings are converted to LF in the repository This effectively means that when you commit to the repo, it will convert line-endings to LF eol Documentation says: This attribute … Read more

Historical reason behind different line ending at different platforms

DOS inherited CR-LF line endings (what you’re calling \r\n, just making the ascii characters explicit) from CP/M. CP/M inherited it from the various DEC operating systems which influenced CP/M designer Gary Kildall. CR-LF was used so that the teletype machines would return the print head to the left margin (CR = carriage return), and then … Read more

Replace CRLF using powershell

This is a state-of-the-union answer as of Windows PowerShell v5.1 / PowerShell Core v6.2.0: Andrew Savinykh’s ill-fated answer, despite being the accepted one, is, as of this writing, fundamentally flawed (I do hope it gets fixed – there’s enough information in the comments – and in the edit history – to do so). Ansgar Wiecher’s … Read more

PHP Echo Line Breaks

Use the PHP_EOL constant, which is automatically set to the correct line break for the operating system that the PHP script is running on. Note that this constant is declared since PHP 5.0.2. <?php echo “Line 1” . PHP_EOL . “Line 2”; ?> For backwards compatibility: if (!defined(‘PHP_EOL’)) { switch (strtoupper(substr(PHP_OS, 0, 3))) { // … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)