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/env bash | |
# Requires HTTPie and JQ | |
# Usage repman-sync-all.sh orgname apikey | |
# Check if jq and http exist | |
command -v jq >/dev/null 2>&1 || { echo >&2 "jq is required but it's not installed. Aborting."; exit 1; } | |
command -v http >/dev/null 2>&1 || { echo >&2 "http (HTTPie) is required but it's not installed. Aborting."; exit 1; } | |
# Function to display usage information | |
usage() { |
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
{ | |
"name": "swichers/passthru_with_errors", | |
"description": "An enhanced passthru() command that includes error capturing.", | |
"license": "Apache-2.0", | |
"authors": [ { "name": "Steven Wichers", "role": "Developer" } ], | |
"require": { | |
"php": ">=5.3.0" | |
}, | |
"autoload": { | |
"files": ["passthru_with_errors.php"] |
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 | |
/** | |
* @file | |
* Drush command implementation for rebuild-field-map. | |
* | |
* This will allow rebuilding the field mapping stored in the key value store | |
* for a given entity type. This is helpful when trying to repair a corrupted | |
* field map store without having to add and remove fields. | |
*/ |
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
# This is useful to have an isolated VPN setup that lets you route SSH traffic | |
# without touching other traffic on the host. | |
# | |
# SETUP: | |
# mkdir ./config | |
# cat ~/.ssh/id_rsa.pub > config/bastion_keys | |
# cp path/to/your.ovpn config/ | |
# chmod 0700 config | |
# chmod 0400 config/bastion_keys | |
# chown -R 4096:4096 config |
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 Behat\Mink\Extension\ElementNotFoundException; | |
use Drupal\DrupalExtension\Context\DrupalContext; | |
class FeatureContext extends DrupalContext { | |
/** | |
* Gives us acess to the other contexts so we can access their properties. | |
* |
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
#!/usr/bin/env bash | |
set -e | |
THEME_PATH=../../docroot/themes/custom | |
for THEME_FOLDER in "${THEME_PATH}"/*; do | |
if [ -d "${THEME_FOLDER}/npm" ]; then | |
THEME=${THEME_FOLDER%*/} | |
THEME=${THEME##*/} |
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
vcl 4.0; | |
# !!Important!! Do not use this if your authenticated response can vary | |
# between users or roles. | |
# Note: This is only useful if the following things are true: | |
# * Access to the jsonapi endpoints is restricted to authorized users only. | |
# * jsonapi request results will be the same for all authorized users. No | |
# customized or filtered results based on role or other access checks. |
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
# Command to run on a bash shell | |
# Adjust as necessary to increase/decrease size of files matched, extensions, exclusions, etc. | |
# Will find images larger than 500k and not in the styles directory. | |
find . -regex ".*\.\(jpg\|gif\|png\|JPG\|PNG\|jpeg\)" -type f -size +500k -not -path "./styles/*" -exec image-resize.sh "{}" \; |
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
#!/usr/bin/env bash | |
# Write log lines to the syslog in a way that the Acquia log streamer | |
# will show them. | |
WATCHDOG_NAME='Logging Example' | |
# General logging to syslog. | |
log() { | |
(>&2 echo "${1}") | |
if [[ ! -z "${AH_SITE_NAME}" ]]; then |
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/docroot/modules/custom/custom_utils/custom_utils.services.yml b/docroot/modules/custom/custom_utils/custom_utils.services.yml | |
index 006b5d51..98868011 100644 | |
--- a/docroot/modules/custom/custom_utils/custom_utils.services.yml | |
+++ b/docroot/modules/custom/custom_utils/custom_utils.services.yml | |
@@ -1,3 +1,11 @@ | |
services: | |
custom_utils.controller.fieldscontroller: | |
- class: Drupal\custom_utils\Controller\FieldsController | |
\ No newline at end of file | |
+ class: Drupal\custom_utils\Controller\FieldsController |
NewerOlder