Configuring Automatic Background Updates – WordPress

Update Types

Automatic background updates were introduced in WordPress 3.7 in an effort to promote better security, and to streamline the update experience overall. By default, only minor releases – such as for maintenance and security purposes – and translation file updates are enabled on most sites. In special cases, plugins and themes may be updated.

Read more

Clearing the quarantine extended attribute from downloaded applications – macOS

When I’m packaging an application for deployment, I normally download the latest version from the vendor. If it’s a drag-and-drop install, where the application is a self-contained bundle, it will get the com.apple.quarantine extended attribute associated with it.

The quarantine attribute is added by the OS so that it can ask for user confirmation the first time the downloaded program is run. Gatekeeper in Lion and Mountain Lion also uses the com.apple.quarantine attribute to determine if an application should be checked (and blocked if needed.)

To avoid issues with both unwanted messages and Gatekeeper, I normally clear this attribute as part of my packaging. Here’s how to check to see if your application has the com.apple.quarantine attribute associated with it:

1. Open Terminal
2. Run the following command:

xattr /path/to/MyApp.app

If the com.apple.quarantine attribute is associated with the application, you should see the following output:

xattr /path/to/MyApp.app
com.apple.quarantine

Note: Other attributes may also be listed, with com.apple.FinderInfo being a common one.
To remove the quarantine attribute, you would then run the following command:

sudo xattr -r -d com.apple.quarantine /path/to/MyApp.app

That will recursively remove the com.apple.quarantine attribute from the application. The -r option will allow the quarantine attribute of all files inside the application to be selected, while the -d option causes the given attribute name (and associated value) to be removed.

Youtube-dl – tips

Youtube-dl is a python based command line video downloader that just works. Despite its name would suggest, youtube-dl downloads more than just youtube videos, it currently supports more than 800 online video and audio sites. If you are using a desktop app or web app to download videos now, chances are it’s using youtube-dl in the back-end. You are better off using youtube-dl instead considering you get so much more power and options with it. Here are some simple tips to get you started.

Install from the source

There are multiple options to get started with installing youtube-dl, I personally recommend installing from the source simply because how frequently its database gets updated and most OS package managers are a bit late when keeping up with the updates. The best thing about youtube-dl is that it runs on all major OS as long as you have python installed.

Windows users can download latest exe file. For Linux, MacOS users:

sudo curl -L https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

Download using cURL to the proper application directory.
Apply proper access permission to run youtube-dl.
Always update to the latest version

Online video players are updated frequently which can often break how youtube-dl download video files from your favorite site. So, just like browser video downloading extensions, it’s a good idea to keep it up-to-date. You could make a cronjob, but I prefer to do it manually.

Updating youtube-dl is as simple as typing:

youtube-dl -U

Read more

VMware Fusion Export VM to OVA

Command line method for exporting to the Open Virtual Appliance (OVA) format from VMware Fusion. Use the OVF tool. The following provides a command line synopsis:

# VMware Fusion Export VM to OVA
# Zilli 20180730

$ cd /Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool
$ ./ovftool --acceptAllEulas \

> /Users/Me/Documents/Virtual\ Machines.localized/theVM.vmwarevm/TheVM.vmx \
> ~/Desktop/TheVM.ova

Opening VMX source: [...]
Opening OVA target: [...]
Writing OVA package: /Users/me/Desktop/TheVM.ova
Transfer Completed                    
Completed successfully

How to Find and Remove @eaDir Directories on Synology NAS

Synology NAS @eaDir directories popping up everywhere. These are “hidden” folders equivalent to thumbs.db on Windows where the package stores thumbnail files associated with iTunes support. If you’re not using iTunes you don’t need these directories. You can remove them in two steps.

In SSH use the following to locate them:

cd /
find. -type d -name"@eaDir"

and if you’re feeling adventurous you can automatically delete them like so:

find . -type d -name "@eaDir" -print0 | xargs -0 rm -rf

Setting up Automatic Update for All WordPress Plugins

You can set WordPress to automatically install all plugin updates by simply adding this code to your theme’s functions.php file or a site-specific plugin.

add_filter( 'auto_update_plugin', '__return_true' );

This filter tells WordPress automatic updater to automatically install plugin updates when they’re available.
If you also want to automatically update your themes, then you can add another code like this:

File icons are not showing in Files panel of Dreamweaver CC Mac

To bring back the lost icons (on Mac) – go to your user configuration folder for DW

~user/library/application support/adobe/Dreamweaver/en_US/Configuration

and edit the Extensions.txt file by adding JPG,GIF,PNG,PDF to the first line (should be the line with ‘:All Documents’)

Now files show up with DW icons and the thousands of console errors are not being generated.