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 | |
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 |
#!/usr/bin/env python3 | |
import urllib.request | |
import urllib.error | |
# Free mobile credentials | |
free_user = "XXX" | |
free_pass = "XXX" | |
# Website to ping | |
sites = [ |