JavaScript is a powerful programming language that is widely used for web development. In order to become a proficient JavaScript developer, it is essential to have a solid understanding of the modern features and best practices.
Weiterlesen „Mastering Modern JavaScript with a Cheat Sheet“Kategorie: Guides
How-to’s
Compress Uncompress files in Linux
There are a number of ways to compress and uncompress files and folders in a linux terminal but I typically use tar.gz; Weiterlesen „Compress Uncompress files in Linux“
Git clone without project folder
I am using Git a lot these days. Git is arguably the best version control software out there especially for collaborative projects.
Simple guide to Github
Love this simple and well illustrated guide to some github basics: http://rogerdudler.github.io/git-guide/
Meet WordPress coding standards on Sublime Text – SublimePhpTidy
I made the move from Coda to Sublime Text this week.
After only a week, I really, really like Sublime Text – it’s fast, pretty and customizable with a wide range of plugins available via the Package Manager.
Here are 9 reasons Sublime Text is only mighty!
I came across an old Coda plugin that I did some work on years ago that is now available on Sublime Text; the plugin helps to tidy and format your code to meet WordPress coding standards.
The plugin is available here – https://github.com/welovewordpress/SublimePhpTidy
It is pretty cool to see something you did a few years ago being picked up by someone else, improved upon and ported to a new editor that you happen to move to :).
How to set revision number to svn external
SVN externals allow to include (nest) a remote SVN repository into another SVN repository. They are a great way to keep the latest code from another repository without having to do much.
One thing you will need to do is tell svn what revision of this remote SVN repository to load. To do that, do the following.
Weiterlesen „How to set revision number to svn external“
WordPress Debug Log without Deprecated Notices
You turn on WordPress debugging only to find the log full of deprecated notices that make the log difficult to parse. Bummer.
You could spend time going through each deprecated notice and updating the offending piece of code. Or you could ask WordPress to ignore these deprecated notices (at least in the short term) by doing the following;
Weiterlesen „WordPress Debug Log without Deprecated Notices“
How to debug your WordPress plugin
If you are developing a plugin on WordPress, you will need to debug your code as you go.
To enable debugging, go to your wp-config.php file.
Find the line…
[source language=“php“]define(‚WP_DEBUG‘, false);[/source]
Replace the line above with the following…
[source language=“php“]
// Turns WordPress debugging on
define(‚WP_DEBUG‘, true);
// Tells WordPress to log everything to the /wp-content/debug.log file
define(‚WP_DEBUG_LOG‘, true);
// Doesn’t force the PHP ‚display_errors‘ variable to be on
define(‚WP_DEBUG_DISPLAY‘, false);
// Hides errors from being displayed on-screen
@ini_set(‚display_errors‘, 0);
[/source]
Now you all warnings and errors will show up in the /wp-content/debug.log file, including WordPress warnings of deprecated functions.
You can write directly to this log from your plugin using the error_log() function.
Typically…
[source language=“php“]
//output some debug string
error_log( ‚this works yo‘ );
//output some array/object
error_log( print_r( $some_obj_or_array, 1 ) );
[/source]
Kudos to this post. It has some good plugin development tips, including how to enable debugging on WordPress.
WP Plugins: How to remove a Filter
Do not use remove_filter(). It is possible it will break other hooks which can have unintended consequences. This post gives a really good alternative approach using static variables.
How to Auto-Forward Gmail Messages in Bulk
Unfortunately, Gmail will not allow you to forward old email via a filter.
I found a way that you can transfer all email from one Gmail account to another, and it works but it’s a tad complicated.
If you want to simply forward old email, the solution from Digital Inspiration using Google Docs is better.
Weiterlesen „How to Auto-Forward Gmail Messages in Bulk“
