This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
<?php | |
namespace App\Utils; | |
use PhpOffice\PhpWord\Element\Link; | |
use PhpOffice\PhpWord\Exception\Exception as PhpWordException; | |
use PhpOffice\PhpWord\TemplateProcessor; | |
class ExtendedTemplateProcessor extends TemplateProcessor |
<?php | |
namespace Drupal\example; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Provides functionality to process render elements. | |
*/ | |
class RenderElementWrapper { |
#!/bin/bash | |
DIR=`dirname $(readlink -f $0)` | |
HEVC_ACTIVE=1 | |
for FILE in *.mp4; do | |
[ -f "$FILE" ] || break; | |
FILENAME=`basename $FILE .mp4` | |
if [[ $HEVC_ACTIVE = 1 ]]; then |
/** | |
* The following example allows to obtain the profile of a given user. | |
* | |
* @param $user \Drupal\Core\Session\AccountInterface | |
* User or UserSession object. | |
* @param $profile_type string | |
* Bundle type of the profile. | |
static function getUserProfile(AccountInterface $user, $profile_type) { | |
$profile = $this->profile_storage->loadByUser($user, $profile_type); |