Remove .DS_Store files in git

Remove .DS_Store files in git

If you are a mac user and using git, you may accidentally commit a file with .DS_Store. Your windows colleague would be confused what does this files do and why do you commit it. First of all, what is .DS_Store file? DS stands for Desktop Services, which are used for

Read More

Git ignore already modified files

I encounter a rare scenario that there is a file modified, but I don’t want to commit this change on git. There are many ways to do such as .gitignore file, but it doesn’t work when the file already tracks. The solution here is to manually ignore the file by

Read More

Debug php code on browser

In javascript, you can console.log(‘whatever”) in your browser for troubleshooting. However, in php code, a little bit trick is required to do so. Here are the steps: function debug_to_console($data) { $output = $data; if (is_array($output)) $output = implode(‘,’, $output); echo “<script>console.log(‘Debug Objects: ” . $output . “‘ );</script>”;} 2. In

Read More