search: /[\W]*^([^.]{0,120}[.\s]{1})[\w\W]*/
Use just $1 as replacement to print only the match.
#!/usr/bin/env bash | |
set -e | |
set -o nounset | |
set -o pipefail | |
project_root=$(git rev-parse --show-toplevel) | |
scripts_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
hooksdir="${project_root}/.git/hooks" |
<?php | |
\Drupal::keyValue('system.schema')->set('moduleName', (int) 8000); |
<?php | |
/* | |
* Customize this file as desired. See https://github.com/drush-ops/drush/blob/8.x/examples/policy.drush.inc for documentation. | |
*/ | |
/** | |
* Implements drush_hook_COMMAND_validate(). | |
* | |
* Encourage folks to use `composer` instead of Drush pm commands |
#!/usr/bin/env bash | |
# For Drupal 8 configuration management. | |
# Strips UUIDs out of configuration YAMLs so that they can be used on any site. | |
# First parameter should be the directory in which to look for the files. | |
for f in $(find "${1}" -type f) | |
do | |
if [[ $(basename "${f}") != "system.site.yml" ]] | |
then | |
perl -pi -e '$_ = "" if ( $. == 1 && $_ =~ /^uuid.*$/ );' "${f}" |
search: /[\W]*^([^.]{0,120}[.\s]{1})[\w\W]*/
Use just $1 as replacement to print only the match.
#!/bin/bash | |
# Save as .git/hooks/prepare-commit-msg (or if one exists, append to it) | |
# and execute `chmod a+x .git/hooks/prepare-commit-msg` | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=( master ) | |
fi |
<?php | |
/** | |
* @file | |
* Local development override configuration feature. | |
* | |
* To activate this feature, copy and rename it such that its path plus | |
* filename is 'sites/example.com/settings.local.php', where example.com | |
* is the name of your site. Then, go to the bottom of | |
* 'sites/example.com/settings.php' and uncomment the commented lines that |
SVG template to create responsive D3.js charts.
Starting point from Making Inline SVG Responsive
<div class="supercontainer"> | |
<div class="container"> | |
</div> | |
</div> | |
<div class="hidden"> | |
<div id="bg-element" class="element"> | |
Lorem ipsum dolor sit amet | |
</div> | |
</div> |
<?php | |
use Drupal\Core\Language\LanguageInterface; | |
use Drupal\Core\Url; | |
/** | |
* Implements hook_language_switch_links_alter(). | |
* | |
* Replaces links in language switcher block with links to front page. | |
*/ |