This file contains hidden or 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 | |
# Example usage: | |
# echo "select distinct type, count(*) from node group by 1 order by 2 desc;" > node_counts.sql | |
# ./query_all.sh node_counts.sql live | tee node_counts.txt | |
UPSTREAM='asdfasdf-asdf-asdf-asdf-asdfasdfasdf'; | |
# Check command line arguments | |
if [[ -z $1 ]]; then |
This file contains hidden or 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 | |
if [[ -z $1 ]]; then | |
echo; echo "Usage: $0 <site.env>"; | |
echo; echo; | |
exit 1; | |
fi | |
# MacOS compatibility.... | |
if [[ "$OSTYPE" == *"darwin"* ]]; then |
This file contains hidden or 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 -e | |
if [[ -z $1 ]]; then | |
echo; | |
echo "Usage: $0 <pantheon_site>"; | |
echo; | |
echo; | |
exit; | |
fi |
This file contains hidden or 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
function ffclip { | |
# some links about calculating durations in bash | |
# https://stackoverflow.com/questions/8903239/how-to-calculate-time-difference-in-bash-script | |
# http://giantdorks.org/alain/script-to-calculate-clip-duration-from-startstop-times/ | |
# http://giantdorks.org/alain/bash-script-to-calculate-duration-between-two-time-stamps-and-also-report-minutes-hours-days-weeks-months-and-years/ | |
# http://www.daveeddy.com/2014/06/29/human-readable-duration-in-bash/ | |
# https://gist.github.com/bezhermoso/2d61cf44646c2f07c0820d81c644c1de | |
if [ "$#" -lt 3 ]; then | |
echo "Usage: ffclip <file> <start> <finish>"; |
This file contains hidden or 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
id: media_youtube | |
label: Migrate Youtube Videos | |
description: Migrate Youtube Videos | |
migration_group: media | |
migration_tags: | |
- Custom | |
source: | |
plugin: file_entity |
This file contains hidden or 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
id: users | |
label: User Migration | |
source: | |
key: source_db | |
plugin: d7_user | |
destination: | |
plugin: entity:user | |
process: |
This file contains hidden or 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\asc_migrate_standardd7\Plugin\migrate\source; | |
use Drupal\Core\Database\Query\Condition; | |
use Drupal\migrate\Row; | |
use Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity; | |
/** | |
* Drupal 7 file_entity source from database. | |
* |
This file contains hidden or 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
id: media_images | |
label: Migrate image file entities | |
description: Migrate image file entities | |
migration_group: media | |
migration_tags: | |
- Custom | |
source: | |
plugin: file_entity |
This file contains hidden or 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
id: media_files | |
label: Migrate managed files | |
description: Migrate managed files | |
migration_group: media | |
migration_tags: | |
- Drupal 7 | |
- Content | |
migration_dependencies: | |
required: |
This file contains hidden or 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 | |
if (empty($json_object->fields) && empty($json_object->field_deltas)) { | |
echo "Embedded Reference -- fields NO, field_deltas NO.\n"; | |
print_r($json_object); | |
die(); | |
} | |
else if (!empty($json_object->fields) && empty($json_object->field_deltas)) { | |
echo "Embedded Reference -- fields YES, field_deltas NO.\n"; | |
} |
NewerOlder