Install the GPG key:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1F3045A5DF7587C3
Ensure apt is set up to work with https sources:
sudo apt-get install apt-transport-https
| <?php | |
| $form['numeric_default_zero'] = array( | |
| '#type' => 'radios', | |
| '#title' => "Only numeric keys, starting at 0. #default_value to 0", | |
| '#default_value' => 0, | |
| '#options' => array( | |
| 0 => "key: 0", | |
| 1 => "key: 1", | |
| 2 => "key: 2", |
| <?php | |
| function MYMODULE_import() { | |
| // Path relative to document root | |
| $csv_filepath = backdrop_get_path('module', 'MYMODULE'); | |
| $csv_filepath .= '/user_list.csv'; | |
| if ($handle = fopen($csv_filepath, 'r') ) { | |
| // Read from CSV |
Source: https://github.com/backdrop-contrib/drush
Create Drush custom commands folder
mkdir -p ~/.drush/commands
| <?php | |
| /** | |
| * Implements hook_theme_suggestions_HOOK_alter(). | |
| */ | |
| function MYTHEME_theme_suggestions_views_exposed_form_alter(array &$suggestions, array $vars) { | |
| // form[#id] pattern is views-exposed-form-VIEWNAME-DISPLAY | |
| // We need to remove the 'views-exposed-form-' part | |
| // and to replace underscores with dashes | |
| $suggestions[] = 'views_exposed_form__' . str_replace( |
MailHog is a nice mail testing tool for developers.
Website: https://github.com/mailhog/MailHog
Download the latest release on your local machine
| <?php | |
| /** | |
| * Implements hook_token_info_alter() | |
| */ | |
| function MODULE_token_info_alter(&$data) { | |
| // Modify description of node tokens for our site. | |
| $data['tokens']['node-field_myfield']['foo'] = [ | |
| 'name' => "Foo", | |
| 'description' => "Process field_myfield value" |
| <?php | |
| // Insert new item on top of the list. | |
| // Display file input first for better UI (https://lut.im/0AkZwIQOUa/dtzEPerqgp3hQ3hk.png) | |
| // In a .module | |
| /** |
| pub 4096R/C061B01D 2013-06-20 | |
| Empreinte de la clef = A975 C4B7 A021 5442 0D36 0E92 246F 5501 C061 B01D | |
| uid [email protected] <[email protected]> | |
| sub 4096R/9D9BDFDF 2013-06-20 |