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
#!/bin/bash | |
ARR=($(zfs list -t snapshot -o name -s name | grep -i -o ".*@syncoid_build.*")) | |
for i in "${ARR[@]}" | |
do | |
echo "Getting rid of snapshot $i..." | |
echo "zfs destroy -R $i" | |
zfs destroy -R "$i" | |
done |
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
$node = node_load($nid); | |
$node_wrapped = entity_metadata_wrapper('node', $node); | |
$references = $collection_node->[name_of_reference_field]->value(); | |
// append new reference (note no sanity checks are included with this Gist) | |
$references[] = node_load($referenced_nid); | |
$collection_node->field_cards_reference->set($references); | |
$collection_node->save(); |