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
/** | |
* Determine if a Mink NodeElement contains a specific css rule attribute value. | |
* | |
* @param NodeElement $element | |
* NodeElement previously selected with $this->getSession()->getPage()->find(). | |
* @param string $rule | |
* Name of the CSS rule, such as "visibility". | |
* @param string $value | |
* Value of the specified rule, such as "hidden". | |
* |
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 | |
# | |
# Remove all duplicate files in current directory that are not present | |
# in Drupal's managed file table. If a backup directory exists then the | |
# files will be moved into that directory instead of being deleted. | |
# | |
# | |
# Determine if a file is manged by drupal. Drush is required. |
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 | |
// Needed for multisite bootstrap. | |
$_SERVER['HTTP_HOST'] = 'domainname.org'; | |
// Name of this script. Include forward slash. | |
$_SERVER['SCRIPT_NAME'] = '/' . 'bootstrap-drupal.php'; | |
// Set this to avoid php warnings. | |
$_SERVER['REMOTE_ADDR'] = ''; | |
define('DRUPAL_ROOT', '/Absolute/path/domainname.org'); |
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
// Comment out this following line in bootstrap.inc | |
set_exception_handler('_drupal_exception_handler'); |
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
# Configure intellij by adding new PHP Server | |
IntelliJ IDEA -> Preferences -> PHP -> Servers | |
# Configure Intellij by adding new Run/Debug Configuration | |
Add new 'PHP Web Application' and select the server name created above. | |
# Run from host to forward 9000 out of virtual machine back to host listener. | |
ssh -p 2222 vagrant@127.0.0.1 -R 9000:localhost:9000 | |
# Edit xdebug configuration in virtual machine |
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
# Copy this into your command prompt to manually flush memcache. | |
# Replace localhost.com with the domain name of the drupal site. | |
drush ev "dmemcache_flush()" --uri="localhost.com" |
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 | |
* When working on a drupal site on localhost instead of production often | |
* there are no files in the localhost files directory. This script will | |
* create (touch) empty filenames that match all files managed by the | |
* drupal database. In a multi-site environment this script should be | |
* located in the drupal root. | |
* |
OlderNewer