Git – General Notes and Basic commands

# Starting git on a folder git init # Starting BitBucket repo # It’s Pretty much the same process for any other git service like GitHub. BTW, the main difference between GitHub and BitBucket services is that in Github it’s free to create public reops, and in BitBucket it’s free to create private repos. …


Fast WordPress Debugging (Debug to console)

A fast way to debug that I use to debug in WordPress, In fact I got used to it so much that I use it on any PHP environment or framework that i work on. The method is debugging php variables and arrays to the console (the browser console) and will print out at …


Bootstrap Responsive Debugging – CSS Media Queries Debugging

Easy way to debug Responsive media breakpoints when you are using Bootstrap. If you are not using Bootstrap you can still adapt this method for Bootstrap debugging in your project, all you need to do is just write these classes to fit your grid system and breakpoints and you are good to go. Just …


WordPress – Get a List of All User Roles (Existing on the Site)

# WordPress – Get a list of all user roles (existing in the site) sometimes you need to see all of the user roles in your website, to do that Add this in functions.php: function get_editable_roles() { global $wp_roles; $all_roles = $wp_roles->roles; $editable_roles = apply_filters(‘editable_roles’, $all_roles); return $editable_roles; } Now, on some page of …


Making .gitignore to take effect (gitignore is not working)

When you add/modify the .gitignore file and then try to commit the changes, you will see that the files you asked git to ignore are still on the HEAD, they are still there, this is because you need to tell git to remove them from the index. The way to “fix” .gitignore file is …