WordPress – wp-config.php essential constants

define( 'WP_SITEURL', 'http://example.com' );
define( 'WP_HOME', 'http://example.com' );

// Disable the Plugin and Theme Editor.
// @see https://wordpress.org/support/article/editing-wp-config-php/#disable-the-plugin-and-theme-editor
define( 'DISALLOW_FILE_EDIT', true );
// Disable Plugin and Theme Update and Installation
// @see https://wordpress.org/support/article/editing-wp-config-php/#disable-plugin-and-theme-update-and-installation
define( 'DISALLOW_FILE_MODS', true );

PHPStorm + WordPress – File and Code Templates

  /**
   * ${FILE_NAME}.php file summary.
   *
   * ${FILE_NAME}.php file description.
   *
   * @link       https://project.com
   *
   * @package    Project
#if (${NAMESPACE} && ${NAMESPACE} != '' && ${NAMESPACE} != ${NAME})   * @subpackage ${NAMESPACE}
#end
   * @author     Arvil Meña <[email protected]>
   * @since      1.0.0
   */

declare(strict_types=1);

WordPress – composer.json template

{
    "name": "arvil/wordpress",
    "description": "Probably doing freelancing again",
    "repositories":[
        {
            "type":"composer",
            "url":"https://wpackagist.org"
        }
    ],
    "require": {
    },
    "extra": {
        "installer-paths": {
            "public/wp-content/plugins/{$name}/": ["type:wordpress-plugin"],
            "public/wp-content/themes/{$name}/": ["type:wordpress-theme"]
        },
        "wordpress-install-dir": "public"
    }
}

ConEmu + Cygwin setup

Notes: oh-my-zsh – can’t use the git status autoload of themes like [PowerLevel9k](https://github.com/bhilburn/powerlevel9k) or any other git-prompt themes, its mandatory to issue `git config –global oh-my-zsh.hide-status 1` to make those theme fast-enough-to-be-usable, this is bec

tmux – conf and layout

# remap prefix to Control + a
set -g prefix C-a
# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
unbind C-b


# learn how to script this
# https://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened
#bind S source-file ~/.tmux/session1

Xubuntu – Themes and icons

----------------Install Adapta GTK Theme on Xubuntu-----------------------
sudo apt-add-repository ppa:tista/adapta
sudo apt-get update
sudo apt-get install adapta-gtk-theme
--------------------------------------------------------------------------

----------------Install Material Icon on Xubuntu--------------------------
sudo add-apt-repository ppa:snwh/pulp sudo apt-get update
sudo apt-get install paper-gtk-theme paper-icon-Theme
--------------------------------------------------------------------------

-----------------Install Numix Circle Icon on Xubuntu---------------------
sudo add-apt-repository ppa:numix/ppa
sudo apt-get update
sudo apt-get install numix-gtk-theme numix-icon-theme-Circle
-------------------------------------------------------------------------------------

WordPress – PHP7.2+ extensions for WordPress

sudo apt install \
php7.0 \
php7.0-bcmath \
php7.0-common \
php7.0-fpm \
php7.0-curl \
php7.0-xml \
php7.0-gd \
php-imagick \
php7.0-imap \
php7.0-json \
php7.0-mbstring  \
php7.0-mcrypt \
php-memcache \
php7.0-mysql \
php7.0-readline \
php7.0-soap \
php-ssh2 \
php7.0-opcache \
php7.0-zip

mysqldump – export MySQL DB from Windows using WSL

mysqldump -h localhost --port=3306 --protocol=TCP -uroot -p test_countryapi > dump.sql

#bzip2
mysqldump -h localhost --port=3306 --protocol=TCP -uroot -p test_countryapi | bzip2 > dump.sql.bz2
#with datetime
mysqldump -h localhost --port=3306 --protocol=TCP -uroot -p test_countryapi | bzip2 > dump-$(date '+%Y%m%d-%H%M%S').sql.bz2

#gzip
mysqldump -h localhost --port=3306 --protocol=TCP -uroot -p test_countryapi | gzip > dump.sql.gz

Ubuntu – Create a new User with custom Home Directory and add to “www-data” group

# copy from existing skel
cp -r /etc/skel /etc/skel-for-web-users
cd /etc/skel-for-web-users
sudo mkdir configs logs web web/public_html
cd logs
touch error.log
touch access.log

# verify contents with
tree /etc/skel-for-web-users
# should output
/etc/skel-for-web-users
├── configs
├── logs
│   ├── access.log
│   └── error.log
└── web
    └── public_html

4 directories, 2 files

Cmder – Windows Setup

Using Git Bash Settings -> Integration: Command: `/single /icon D:\_cmder\icons\cmder_red.ico -run {Git Bash}` Icon File: `”D:\_cmder\icons\cmder_red.ico”`