Export Configuration using Drupal Console into a Module

Technologies: 

Drupal console can be used to export configuration to an existing module.

Exporting Content Types : Remove UUID and Config hash. Also specify module as ji_custom in this case

vendor/drupal/console/bin/drupal  config:export:content:type  support_ticket --remove-uuid  --remove-config-hash  --module=ji_custom

Exporting Custom Entity types, in this case generated using ECK module

Handling Issues in Migration

Fix "non-existent config entity name returned by FieldStorageConfigInterface::getBundles()"
Normally it will show that a field belongs to a non existing bundle for a node, comment etcetra in log post migration.
Solving a field that does not belong to non existent bundle in a node, example, field_agenda present in a non existent bundle makemeeting of node type

Optimizing Images using command line

The images uploaded by users may not be of ideal size and may require compression to manage server space. There are some tools available for compressing JPG and PNG files.
Please note that the owner changes to the current username for the file after compression. Please remember to change ownership if required of the file or per folder post compression.

jpegoptim :
Optimize a jpg image with the same name

jpegoptim image.jpg

Optimize all jpg images in a folder

Managing Flag Development In D8

Technologies: 

Check if an entity has been flagged:

/**@var \Drupal\flag\FlagService $flag_service */
$flag_service = \Drupal::service('flag');
$flag = $flag_service->getFlagById($flag_id);
return $flag->isFlagged($node);

Get all flagging users for an entity and flag:

$flagging = $flag_service->getFlaggingUsers($entity, $flag); //  $flag is optional

Flag an entity:

SSL Certificate Using Let's Encrypt for Ubuntu

Automated creation, renewing of certificates is provided by software called certbot.

To view a list of the certificates Certbot knows about, run the certificates subcommand:

$> certbot certificates

Deleting certificates

$> certbot delete --cert-name example.com

Install Certificates Using Apache

Git Management

Technologies: 

Associating your local repo to a repo in third party Git repository, say Bitbucket.

Step 1: Switch to your repository's directory

cd /path/to/your/repo

Step 2: Connect your existing repository to Bitbucket