This is a collection of scripts will find modules (non core) that are in the codebase which are not installed and report their path. It will skip submodules (using the "project" key in the module info).
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/sh | |
# Open and close secure key | |
secureUSBOpen () { | |
luksDev="$1" | |
luksName="$2" | |
mountPoint="/media/USB/${luksName}" | |
# Check if we have the right args | |
if [ $# -ne 2 ]; 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
#!/bin/bash | |
DRUSH=$(which drush) | |
GIT=$(which git) | |
if [ -z $DRUSH -o -z $GIT ]; then | |
echo "Missing drush!" | |
exit -1 | |
fi |
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/sh | |
# | |
# Swaps between php-fpm versions. | |
# This function assumes php binaries inslatted with brew | |
# | |
# @parameter Semplified php version number | |
# (eg. PHP 5.6 is simply 56, PHP7.0 is 70 and so on...) | |
# | |
php-fpm.swap-to() { |
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/sh | |
# | |
# This will check the A record both for the provided NameServer | |
# and for the domain's specified NS | |
# | |
if [ "$1" = "--help" -o "$1" = "-h" ]; then | |
echo "\nUsage:" | |
echo "$0 \$NS_IP domain1.tld domain2.tld ..." | |
echo "Example: $0 8.8.8.8 google.com example.com\n" |
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/sh | |
# Some helper commands | |
# Get the container id based on a pid child process | |
ps faux | grep -C10 $MY_PID | grep "docker-containerd-shim" | |
# Given a container name gets the APP_NAME | |
# For example: $MY_CONTAINER_NAME="k8s_web-backend.416e49d_web-backend-5f3qk_bb561cbf-f330-4188-be92-2ea9f607b71f_69f3bc6a-e240-11e6-ab50-5efaafd16bc4_8950f42d" | |
docker exec -ti $(docker inspect --format="{{.ID}}:{{.Name}}" $(docker ps -aq --no-trunc) | grep $MY_CONTAINER_NAME | cut -f1 -d':') /usr/bin/env | grep APP_NAME | |
# Simplified version |
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
varnishlog -aAD -w ./varnish-ban.log -P ./varnish-ban.pid -g raw -q "CLI ~ 'Rd ban obj.*'" |
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
# Update Drupal modules on composer-based setups | |
comp-drup() { | |
if [ -z "$1" ]; then echo -e "\e[31m[ERR] You MUST specify a module name\e[0m" 1>&2; return -1; fi; | |
if [ ! -f ./composer.json ]; then echo -e "\e[31m[ERR] Missing composer.json file. Are you sure you're in the correct directory? \e[0m" 1>&2; return -2; fi; | |
composer update "drupal/$1" --with-dependencies | |
} |
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 | |
# [...] All your config | |
/* Composer Manager configuration */ | |
$conf['composer_manager_vendor_dir'] = realpath(DRUPAL_ROOT .'/../vendor'); | |
$conf['composer_manager_file_dir'] = realpath(DRUPAL_ROOT .'/..'); | |
# [...] more stuff |
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/sh | |
# | |
# Argument 1: Source drush-based drupal | |
# Argument 2: Destination composer-based drupal | |
# | |
OLD_ROOT=$1 | |
NEW_ROOT=$2 | |
if [ ! -d "$OLD_ROOT" ]; then | |
echo "Source directory not found!" |