Skip to content

Instantly share code, notes, and snippets.

View augustofagioli's full-sized avatar
🎯
writing

Augusto augustofagioli

🎯
writing
View GitHub Profile
@andriyun
andriyun / drupal8-change-active-theme-programmatically.php
Last active November 22, 2022 19:56
Drupal 8 switch active theme programmatically
<?php
/**
* See original implementation http://cgit.drupalcode.org/mailsystem/tree/src/MailsystemManager.php#n60
*/
// Switch the theme to the configured mail theme.
$theme_manager = \Drupal::service('theme.manager');
$mail_theme = '[your theme name]';
$current_active_theme = $theme_manager->getActiveTheme();
if ($mail_theme && $mail_theme != $current_active_theme->getName()) {
$theme_initialization = \Drupal::service('theme.initialization');
@michel-zimmer
michel-zimmer / readme.md
Last active September 25, 2024 10:26
Add a guest for sddm (tested under KDE neon)

Add a guest user for sddm

The objective is to create a passwordless login for a user named guest, whose home directory is cleared on logout.

This was tested under KDE neon (which is based on Ubuntu 16.04).

The following script clears the home directory of a user and replaces it with a tmpfs containing the contents of /etc/skel:

#!/bin/sh -e