Archive for September 2018

Check if database table column exists

SHOW COLUMNS FROM Tablename WHERE FIELD = "Fieldname";

Find and rename files uppercase to lowercase

find my_folder -depth -exec rename ‘s/(.*)\/([^\/]*)/$1\/\L$2/’ {} \; Find my pattern and rename find ./ -type f -name ‘*_en-gb.json’ -exec sh -c ‘mv "$0" "${0%_en-gb.json}_en-uk.json"’ {} \;

Git rollback to particular commit

Use gitk to find out which commit you want to rollback and do the following: git reset –hard 53c309929253a2a