This file contains hidden or 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
server { | |
server_name SERVER_NAME; | |
listen 80; | |
root /var/www/html/; | |
index index.php; | |
fastcgi_keep_conn on; | |
fastcgi_index index.php; | |
fastcgi_param QUERY_STRING $query_string; |
This file contains hidden or 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
drush config-export --skip-modules=devel,kint,stage_file_proxy |
This file contains hidden or 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 | |
/** | |
* Boost published_at field to prioritize newer content. | |
* | |
* @see https://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_boost_the_score_of_newer_documents | |
* Implements hook_search_api_solr_query_alter(). | |
*/ | |
function my_module_search_api_solr_query_alter(array &$call_args, SearchApiQueryInterface $query) { | |
// Boost more recently created articles. Boost the field with score +8 shrinking during 365 days. |
This file contains hidden or 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_views_query_alter(). | |
*/ | |
function ramsalt_shy_replacement_views_query_alter(&$view, &$query) { | |
if ($view->name === 'frontpage_admin') { | |
foreach ($query->where[1]['conditions'] as $delta => $condition) { | |
if ($condition['field'] === 'node.title') { | |
$query->add_where_expression(1, "REPLACE(node.title, '=', '') " . $condition['operator'] . " '" . $condition['value'] . "'"); |
This file contains hidden or 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
/** | |
* Gulp file for Drupal theming, including clever drush cache clearing. | |
* | |
* Usage in docker4drupal environment: `gulp --docker` | |
* It ensures, that drush is executed from the php container. | |
*/ | |
var gulp = require('gulp'); | |
var argv = require('yargs').argv; | |
var plumber = require('gulp-plumber'); |
This file contains hidden or 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
drush sql-dump --structure-tables-list=ctools_object_cache,ctools_css_cache,cache,cache_field,cache_form,cache_filter,cache_menu,cache_page,cache_views,cache_views_data,history,sessions,watchdog > ~/backup/database/backup-20170303.sql |
This file contains hidden or 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
. |
This file contains hidden or 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/manualcrop.helpers.inc b/manualcrop.helpers.inc | |
index 1375f99..090cca0 100644 | |
--- a/manualcrop.helpers.inc | |
+++ b/manualcrop.helpers.inc | |
@@ -636,6 +636,8 @@ function manualcrop_save_crop_data($file, $data) { | |
* - "height": An integer representing the height in pixels. | |
*/ | |
function manualcrop_load_crop_selection($file, $style_name = NULL) { | |
+ drupal_alter('manualcrop_load_crop_selection', $file); | |
+ |
This file contains hidden or 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
server { | |
server_name SERVER_NAME; | |
listen 80; | |
root /var/www/html/; | |
index index.php; | |
fastcgi_keep_conn on; | |
fastcgi_index index.php; | |
fastcgi_param QUERY_STRING $query_string; |
This file contains hidden or 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/sh | |
# Usage: sudo curl https://gist.githubusercontent.com/szeidler/0b0e166b0e34dbb01248680627470af1/raw/setup-docker4drupal-mac-environment.sh | sh | |
# Check if docker is setup. | |
if ! [ -x "$(command -v docker-compose)" ]; then | |
echo 'Make sure, that you have installed Docker4Mac: https://download.docker.com/mac/stable/Docker.dmg' | |
exit 1 | |
fi | |
# Install unison for Mac |