This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Creates DISK0.tree, DISK1.tree, DISKx.tree inside each disk, with the output of tree command. | |
# After generating the report, it send via email using mail. | |
# To add more disks, just add DISK[x]=/full/path to the disk. Just make sure that the array index are sequencial. | |
# Why this? | |
# With the reports from tree, in case of disk failure, you will know which file got lost and you can recover them, downloading or via backups. | |
# GIST: https://gist.github.com/rafaelbiriba/0ee7ca2baec1ef80a878c825295f09e1 | |
EMAIL_ADDRESS="" # EMAIL_ADDRESS="email@gmail.com" or leave it blank "" to disable email | |
DISKS[0]="/srv/dev-disk-by-id-ata-WDC_WD80EMAZ-00WJTA0_ABC123-part1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Settings] | |
ID = "Your_Site_ID" | |
# Settings in the [build] context are global and are applied to all contexts unless otherwise overridden by more specific contexts. | |
[build] | |
# This is the directory to change to before starting a build. | |
base = "project/" | |
# NOTE: This is where we will look for package.json/.nvmrc/etc, not root. | |
# This is the directory that you are publishing from (relative to root of your repo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Set these Customer Parameters to make this service work for your Institution. The apiKey should have acces to the Primo Search API and can be set up in the Ex Libris Developers Network. | |
$apiKey = "<Your API Key Here>"; | |
//The vid, searchscope, and searchTab parameters are the same as the ones used for deep links described here: | |
//https://developers.exlibrisgroup.com/primo/apis/deeplinks/brief | |
$vid = "BRAND"; | |
$searchScope = "ALMA"; | |
$searchTab = "alma"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Drush command implementation for rebuild-field-map. | |
* | |
* This will allow rebuilding the field mapping stored in the key value store | |
* for a given entity type. This is helpful when trying to repair a corrupted | |
* field map store without having to add and remove fields. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\yaml_content\EventSubscriber; | |
use Drupal\block\Entity\Block; | |
use Drupal\block_content\Entity\BlockContent; | |
use Drupal\Core\Config\ConfigFactoryInterface; | |
use Drupal\Core\Entity\EntityStorageException; | |
use Drupal\yaml_content\Event\EntityPostSaveEvent; | |
use Drupal\yaml_content\Event\YamlContentEvents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// modules/custom/my_custom_module/src/Plugin/migrate/source/FileEntity.php | |
namespace Drupal\my_custom_module\Plugin\migrate\source; | |
use Drupal\Core\Database\Query\Condition; | |
use Drupal\migrate\Row; | |
use Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity; | |
/** | |
* Drupal 7 file_entity source from database. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
/** | |
* push events to Google Tag Manager when the Marketo Forms 2 Javascript is | |
* loaded and executed and when Marketo form events occur | |
* uses the Marketo Forms 2.0 API | |
* http://developers.marketo.com/documentation/websites/forms-2-0/ | |
* | |
* @author Keith W. Shaw <keith.w.shaw@gmail.com> | |
* @license MIT | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\sandbox\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormInterface; | |
use Drupal\Core\Form\FormState; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\node\Entity\Node; | |
use Drupal\user\Entity\User; |
NewerOlder