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
echo '{"a":"b"}' | jq -R -r '. as $line | try fromjson catch $line' | |
# Prints | |
# { | |
# "a": "b" | |
# } |
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 php-eval "print_r(entity_load('field_collection_item', array(803409))[803409]->field_product_url)"; |
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
colima start --cpu 6 --memory 12 --disk 250 --mount-type=sshfs |
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
services: | |
php: | |
image: q0rban/tugboat-drupal:8.8 | |
default: true | |
http: false | |
depends: mysql | |
commands: | |
update: | | |
set -eux | |
# Check out a branch using the unique Tugboat ID for this repository, 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
<?php | |
/** | |
* Drupal 7 field extract script. | |
* | |
* Extracts all fields into a csv file so it can be open with Google Spreadsheet, LibreOffice, or Excel. | |
* | |
* Usage: | |
* 1. Save this file to the docroot. | |
* 2. run drush php-script exctract_fields.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
select fci.entity_type, fci.bundle, fci.field_name, fc.type, fc.module | |
from field_config_instance fci | |
inner join field_config fc on fc.id = fci.field_id | |
order by fci.entity_type ASC, fci.bundle ASC, fci.field_name ASC; |
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 | |
/** | |
* Command line tasks. | |
* | |
* @codingStandardsIgnoreStart | |
* @codeCoverageIgnore | |
* @SuppressWarnings(PHPMD) | |
*/ | |
class RoboFile extends \Robo\Tasks { |
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
# 1. Delete the migration group. | |
# This command needs the patch at https://www.drupal.org/project/migrate_tools/issues/2977501#comment-12640911 | |
drush migrate:delete-group migrate_drupal_7 | |
# 2. Recreate the migration group. | |
drush migrate:upgrade --legacy-db-key=drupal7 --legacy-root=sites/default/files --configure-only | |
# 3. Export the configuration, then review and commit the changes. | |
drush config:export -y |
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
# 1. Download dependencies. | |
composer require drupal/migrate_tools:4.x-dev drupal/migrate_upgrade:3.x-dev drupal/migrate_plus:4.x-dev | |
# 2. Enable modules. | |
drush en -y migrate_tools,migrate_upgrade,migrate_plus | |
# 3. Generate a migration group. | |
drush migrate:upgrade --legacy-db-key=drupal7 --legacy-root=/var/www/drupal/drupal7 --configure-only | |
# 4. Export group into configuration and commit the files. Then review and commit the files. |
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
dependencies[] = ctools | |
; Views Handlers | |
files[] = views/mymodule_handler_filter_myfiltername.inc |
NewerOlder