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 | |
set -e | |
[ -z "$1" ] && echo -e "Example:\n$0 www.example.com" && exit 1; | |
# Number of seconds between DNS queries. | |
durationSleep=60; | |
# Email address to send a notification to, if you have mail configured properly. |
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 | |
set -e | |
[ -z "$1" ] && echo -e "Example:\n$0 http://www.example.com" && exit 1; | |
# Number of seconds between checks. | |
durationSleep=60; | |
original=$(curl -s -I $1 |grep "HTTP/"); |
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
# drush pm-list | grep features | |
Features Features (features) Module Enabled 7.x-2.10 | |
# drush fra -y | |
Command fra needs the following module(s) enabled to run: features. [error] | |
The drush command 'fra' could not be executed. | |
# (ノಠ益ಠ)ノ | |
# drush cc drush | |
# drush fra -y | |
The following modules will be reverted:... | |
... |
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 | |
# Example: make_drupal_patches.sh 7.44 7.50 | |
# Creates patches between the versions given for both git sourced Drupal and manually | |
# downloaded Drupal. Patch files are placed in ~/drupal_patches/ | |
# | |
# Assumes Drupal 7. | |
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
{ | |
"name": "drupal-composer/drupal-project", | |
"description": "Project template for Drupal 8 projects with composer", | |
"type": "project", | |
"license": "GPL-2.0-or-later", | |
"authors": [ | |
{ | |
"name": "", | |
"role": "" | |
} |
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 | |
# xdebug.sh will toggle Xdebug between enabled and disabled if given no arguments. | |
# You may optionally provide a 1 or a 0 as an argument to enable it if it is off or | |
# disabled it if it is on. If Xdebug is enabled or disabled by this script it will restart | |
# apache. If you provide status as an arguemnt it will echo either "true" if Xdebug | |
# appears enabled, "false" if it isn't. | |
# | |
# Example: Turn off Xdebug if it's on | |
# xdebug.sh 0 |
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 | |
namespace Drupal\config_logger\EventSubscriber; | |
use Drupal\Core\Config\ConfigCrudEvent; | |
use Drupal\Core\Config\ConfigEvents; | |
use Drupal\Core\Session\AccountInterface; | |
use Psr\Log\LoggerInterface; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
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 | |
$info = gitInfo(); | |
echo "Branch/Tag: " . $info['branch'] . "<br />"; | |
echo "Hash: " . $info['hash'] . "<br />"; | |
/** | |
* Extracts the branch or tag name from a Git repository given the locaiton of | |
* a .git directory. |