php mail on nginx

https://github.com/ladybirdweb/faveo-helpdesk/wiki/Install-and-configure-a-simple-mail-server-for-sending-mails-using-PHP-mail-function-in-Faveo-on-Ubuntu-16.04-server

sudo apt-get update

sudo apt-get install postfix
After the installation is complete, run the command to configure Postfix:
sudo dpkg-reconfigure postfix

nginx phpmyadmin

make symbolic links

sudo ln -s /usr/share/phpmyadmin /var/www/html
Finally, we need to enable the mcrypt PHP module, which phpMyAdmin relies on. This was installed with phpMyAdmin, so we’ll toggle it on and restart our PHP processor:  

sudo phpenmod mcrypt sudo systemctl restart php7.0-fpm 

http://server_domain_or_IP/phpmyadmin 

/root/.digitalocean_password

phpmyadmin

ijungiam phpmyadmin configuracija. atsiras linkas localhost/phpmyadmin

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin.conf
phpmyadmin .htaccess (Require valid-user = extra slaptazodis)
 nano /usr/share/phpmyadmin/.htaccess

Post Type admin custom column

https://rudrastyh.com/woocommerce/columns.html
add_filter( 'manage_edit-product_columns', 'add_custom_column' );
function add_custom_column( $columns ){
    $columns['artikulai'] = 'Artikulai';
    return $columns;
}

add_action( 'manage_posts_custom_column', 'populate_columns' );
function populate_columns( $column_name ){
    if( $column_name == 'artikulai' ) {
        echo '000';
    }
}

Git init –bare

    1. git init --bare (--bare flag it is generally only used on servers)
    2. create file: project.git/hooks/post-receive/
    3. Write in file: git --work-tree=/var/www/project --git-dir=/var/repo/project.git checkout -f
    4. chmod +x post-receive
    5. create project folder: /var/www/project

git clear working directory

git checkout . - Removes Unstaged Tracked files ONLY [Type 2]

git clean -f - Removes Unstaged UnTracked files ONLY [Type 3]

git reset --hard - Removes Staged Tracked and UnStaged Tracked files ONLY[Type 1, Type 2]

git stash -u - Removes all changes [Type 1, Type 2, Type 3]

Conclusion:

It's clear that we can use either

(1) combination of `git clean -f` and `git reset --hard`
OR

(2) `git stash -u`

Chmod

chmod 777 -R folder

Chmod 777 – Read, write and execute for owners, groups and others
Chmod 755 – Read, write and execute for owners, read and execute for groups and others
Chmod 655 – Read and write for owners, read and execute for groups and others