Youtube-dl – tips

By Zilli,

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

… Continue reading

Centos 7.1 – error repository

By Zilli,

Uncomment baseurl in this file: /etc/yum.repos.d/CentOS-Base.repo

#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/

In this block:

name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

By uncomment, I mean change this:

#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/, to this: 
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ (remove the #).

  Category: OS
  Comments: None

VMware Fusion Export VM to OVA

By Zilli,

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

By Zilli,

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

By Zilli,

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:

Upgrade to macOS High Sierra

By Zilli,

Upgrading from previous versions of OS X

Upgrading from OS X Snow Leopard or Lion
If you’re running Snow Leopard (10.6.8) or Lion (10.7) and your Mac supports macOS High Sierra, you will need to upgrade to El Capitan first. Click here for instructions: https://support.apple.com/en-us/HT206886


Upgrading from OS X Leopard

If you’re running Leopard and would like to upgrade to macOS High Sierra, first you’ll need to upgrade to OS X Snow Leopard. You can purchase OS X Snow Leopard from the Apple Online Store.

  Category: OS
  Comments: None

WordPress auto update config

By Zilli,

1. disable FTP commands from config.php
2. add to config.php

// Update core
define( 'WP_AUTO_UPDATE_CORE', true );

optionally for Synology NAS

# reset chown for Synology user nobody
chown -R nobody:nobody /web/wordpress/dir

# reset files and folders chmod in /web/wordpress/dir
find . -type f -exec chmod 0644 {} \;
find . -type d -exec chmod 0755 {} \;