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
function cleanHeatmap() { | |
map.removeLayer(heatmap); | |
} | |
function showHeatmap(heatdata, maxValue) { | |
if (heatmap === null) { | |
heatmap = L.heatLayer(heatdata, | |
{radius: 35, max: maxValue / ratio, | |
blur: 25, | |
gradient: {0.0: 'blue', 0.5: 'lime', 1: 'red'} |
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\Tests\permissions_by_term\Kernel; | |
use Drupal\KernelTests\KernelTestBase; | |
use Drupal\field\Entity\FieldStorageConfig; | |
use Drupal\taxonomy\Entity\Vocabulary; | |
/** | |
* Tests the ERR composite relationship upgrade path. |
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
<target name="syncWebsiteToLive" | |
description="Sync folder and files via Rsync to live server."> | |
<echo msg="Syncing data to live server." /> | |
<exec command="rsync -a --progress --delete /home/peter/Websites/example.com/ --exclude=.git/ --exclude=.idea/ --exclude=sites/default/settings.php user@example.com:/var/www/example.com/" | |
passthru="true" | |
checkreturn="true" /> | |
<echo msg="Delete old database" /> | |
<exec command="ssh example.com 'mysql -uroot -pPASSWORD -e "drop database example_com;"'" | |
passthru="true" | |
checkreturn="true" /> |
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
<phpunit bootstrap="tests/bootstrap.php" colors="true" | |
beStrictAboutTestsThatDoNotTestAnything="true" | |
beStrictAboutOutputDuringTests="true" | |
beStrictAboutChangesToGlobalState="true" | |
checkForUnintentionallyCoveredCode="false" | |
printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter"> | |
<php> | |
<!-- Set error reporting to E_ALL. --> | |
<ini name="error_reporting" value="32767"/> | |
<!-- Do not limit the amount of memory tests take to run. --> |
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
<VirtualHost *:443> |
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
<VirtualHost *:80> |
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
# Redirect all requests to SSL and ensure www. subdomain is re-directed, too. | |
<VirtualHost *:80> | |
ServerName your-domain.com | |
Redirect / https://your-domain.com/ | |
</VirtualHost> | |
<VirtualHost *:80> | |
ServerName www.your-domain.com | |
Redirect / https://your-domain.com/ | |
</VirtualHost> |
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 | |
$dom = new \DOMDocument('1.0', 'UTF-8'); | |
// PHP will output warnings about non-standard HTML. Suppress it by "@". | |
@$dom->loadHTML($source); | |
// Iterate over all link-elements. | |
foreach ($dom->getElementsByTagName('link') as $node) { | |
// Copy the element to be able to replace it. | |
$updated_element = $node; | |
$href_value = $updated_element->getAttribute( 'href' ); |
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
gaya.info.yml: | |
name: Gaia | |
type: theme | |
description: 'A starter theme which is based on the Drupal core template files.' | |
package: Core | |
version: 8.x-1.0 | |
core: 8.x | |
libraries: | |
- gaia/global-styling |
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 | |
$provider_ids = Provider::find() | |
->select(['id']) | |
->where(['parent_id' => $parent_provider_id]); | |
$num_providers = $provider_ids->count(); | |
if($num_providers > 0){ | |
$arr_provider = $provider_ids |
NewerOlder