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
/** | |
* Sample JS Library for testing JSDoc parsing. | |
* @module SampleJSLibrary | |
*/ | |
/** | |
* A constant value representing the library version. | |
* @const {string} VERSION | |
* @desc The version of the library. | |
*/ |
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
/** | |
* Get unique values from an array of objects based on a specified field. | |
* | |
* @param {Array} data - The array of objects to extract unique values from. | |
* @param {string} field - The field in each object to extract unique values from. | |
* @returns {Array} An array containing unique values from the specified field. | |
*/ | |
function getUniqueValues(data, field) { | |
// Check if 'data' is an array and 'field' is a string | |
if (!Array.isArray(data) || typeof field !== 'string') { |
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 | |
use Drupal\Component\Utility\NestedArray; | |
if (empty($extra[0])) { | |
throw new \Exception("Please supply the id of the node you want to export to CDF."); | |
} | |
$node = \Drupal::entityTypeManager()->getStorage('node')->load($extra[0]); | |
$wrapper = new \Drupal\depcalc\DependentEntityWrapper($node); |
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
Easily create a modal link in Drupal | |
p><a class="use-ajax" data-dialog-options="{"width":800}" data-dialog-type="modal" href="/node/2">See node 2</a></p> | |
source: https://befused.com/drupal/modal |
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
uuid: f9c22d2e-c285-4fb9-b5a0-5dc0e492248e | |
langcode: en | |
status: true | |
dependencies: | |
module: | |
- media | |
- user | |
id: media_revisions | |
label: 'Media revisions' | |
module: views |
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
Verifying my Blockstack ID is secured with the address 12B9JABVzJob3JLcgAkp1KaEpJzqrjdLiE https://explorer.blockstack.org/address/12B9JABVzJob3JLcgAkp1KaEpJzqrjdLiE |
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 | |
skipped=() | |
# Ask user which file to use for aliases, or if to run it straight | |
echo "Which file contains the list of the sites that you want URLs for?" | |
read alias_command | |
if test -f $alias_command; then | |
oldIFS="$IFS" |
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 | |
# Setup array variables | |
d8_sites=() | |
d7_sites=() | |
d7_restws=() | |
error_sites=() | |
# Ask user which file to use for aliases, or if to run it straight | |
echo "Which file contains the list of aliases to check?" |
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
<!-- No PHP in the template, even though it has the PHP extension on the file. --> | |
<div class={{ classes }} pod"> | |
<div class="pod--inner"> | |
<h3>{{ title }}</h3> | |
{{ image }} | |
<p>{{ promo }}</p> | |
{{ link }} | |
<p><small>{{ terms }}</small></p> | |
</div> | |
</div> |
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
api = 2 | |
core = 7.x | |
projects[] = "drupal" | |
projects[sprout][type] = profile | |
projects[sprout][download][type] = "git" | |
projects[sprout][download][url] = "http://git.drupal.org/project/sprout.git" |
NewerOlder