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
check_redirect () { | |
echo -n "$1: "; | |
curl -is "$1" | grep '^Location:' | perl -pe 's/^Location: //;chop;' | |
echo; | |
} |
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 | |
# This outputs "\$conf" as desired | |
echo $'s/^(\\$conf\\[\'simplesamlphp_auth_installdir\'\\] = .*)/if(whatever){ $1 } else { whatever };/' | |
# Yes, it can also be done with this craziness | |
echo 's/^(\$conf\['"'"'simplesamlphp_auth_installdir'"'"'\] = .*)/if(whatever){ $1 } else { whatever };/' | |
# But it doesn't seem to be possible with "..." ? | |
echo "s/^(\$conf\['simplesamlphp_auth_installdir'\] = .*)/if(whatever){ \$1 } else { whatever };/" |
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
gen_dev_config() { | |
if [[ -z "$1" ]]; then | |
echo "Usage: gen_site_config <site_name>"; | |
echo; | |
return 1; | |
fi | |
password=$(</dev/urandom tr -dc '0-9!@#$%a-zA-Z' | head -c16; echo ""); | |
underscores=$(echo "$1" | sed 's/\./_/g' | sed 's/-//g'); | |
dev_underscores=$(echo "dev_$underscores"); |
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"; | |
} |
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
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
<?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: 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
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
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>"; |
OlderNewer