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
SELECT n.nid, n.title, flag.count AS cnt | |
FROM node n | |
INNER JOIN flag_counts flag ON flag.entity_id = n.nid | |
INNER JOIN field_data_field_project project on project.entity_id = n.nid | |
WHERE flag.fid = 4 /* project_issue_follow */ | |
AND project.field_project_target_id = 2573607 /* contrib_tracker */ | |
GROUP BY n.nid | |
ORDER BY cnt DESC | |
LIMIT 100; |
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
{ | |
"minimum-stability": "dev", | |
"require": { | |
"composer/installers": "dev-drupal-core", | |
"drupal/drupal-core": "8.0.*", | |
"drupal/devel": "dev-8.x-1.x", | |
"drupal/config_devel": "dev-8.x-1.x" | |
}, | |
"require-dev": { | |
"drupal/devel": "dev-8.x-1.x", |
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
services: | |
cache.backend.memory: | |
class: Drupal\Core\Cache\MemoryBackendFactory |
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
diff --git a/sites/default/settings.php b/sites/default/settings.php | |
index b2ce930..9d0514e 100644 | |
--- a/sites/default/settings.php | |
+++ b/sites/default/settings.php | |
@@ -611,7 +611,8 @@ | |
* The 'bootstrap_config_storage' setting needs to be a callable that returns | |
* core.services.yml. | |
*/ | |
- # $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage'); | |
+$settings['bootstrap_config_storage'] = 'Drupal\Core\Config\BootstrapConfigStorageFactory::getFileStorage'; |
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 | |
# | |
# Git pre-commit hook for Drupal projects. | |
# Created by Dave Hall - http://davehall.com.au | |
# Distributed under the terms of the WTFPL - http://www.wtfpl.net/ | |
# | |
set -e |
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 | |
/** | |
* This gist is no longer maintained - it is a proper repo now: | |
* | |
* @see https://github.com/sun/drupal-reinstall | |
*/ | |
# ██╗ ██╗██████╗ ██████╗ ███╗ ██╗ ██████╗ |
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 | |
/* do this if MIME type is 'application/xhtml+xml' */ | |
ob_start(function ($buffer) { | |
$replacer = array( | |
'/(<script[^<>]*>)([^<>]+)(<\/script>)/' => '$1<![CDATA[ $2 ]]>$3', | |
'/(<style[^<>]*>)([^<>]+)(<\/style>)/' => '$1<![CDATA[ $2 ]]>$3', | |
/* more replaces may follow, like: | |
* replace ampersand-characters, which are not part of an entity or within a CDATA-block |
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 | |
require './core/vendor/autoload.php'; | |
use Symfony\Component\Yaml\Parser; | |
function quantile($values, $p) { | |
sort($values); | |
$H = (count($values) - 1) * $p + 1; | |
$h = floor($H); | |
$v = $values[$h - 1]; |