git undo all uncommitted or unsaved changes

This will unstage all files you might have staged with git add:git reset This will revert all local uncommitted changes (should be executed in repo root):git checkout . You can also revert uncommitted changes only to particular file or directory:git checkout [some_dir|file.txt] Yet another way to revert all uncommitted changes (longer to type, but works from … Read more

phpmyadmin #1045 Cannot log in to the MySQL server. after installing mysql command line client

In case MySQL Server is up but you are still getting the error: For anyone who still have this issue, I followed awesome tutorial http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-9-mavericks/ However i still got #1045 error. What really did the trick was to change localhost to 127.0.0.1 at your config.inc.php. Why was it failing if locahost points to 127.0.0.1? I don’t know. But it worked. ===== … Read more

How to easily print ascii-art text?

pyfiglet – pure Python implementation of http://www.figlet.org pip install pyfiglet termcolor – helper functions for ANSI color formatting pip install termcolor colorama – multiplatform support (Windows) pip install colorama Example $ python print-warning.py | cat .___ ___. __ _______. _______. __ __ _______ __ | \/ | | | / | / || | | … Read more

How to colorize diff on the command line

Man pages for diff suggest no solution for colorization from within itself. Please consider using colordiff. It’s a wrapper around diff that produces the same output as diff, except that it augments the output using colored syntax highlighting to increase readability: or just: Installation: Ubuntu/Debian: sudo apt-get install colordiff OS X: brew install colordiff or port install colordiff

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