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
###### | |
# Author: Adrian Moreno, based on Marcelo de Salles' script: https://gist.github.com/marcellodesales/a890b8ca240403187269 | |
# Description: Create Create Environment Variables in EC2 Hosts from EC2 Host Tags | |
# Changes from original: | |
# - removed the need of passing region to the tags command in AWS | |
# - processing aws generated variables (with ":" on their value of key) | |
# | |
### Requirements: | |
# * Install jq library (sudo apt-get install -y jq) | |
# * Install the EC2 Instance Metadata Query Tool (http://aws.amazon.com/code/1825) |
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
yum install -y perl-CPAN nano wget zip unzip perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https gcc gcc-c++ make openssl-devel | |
export PERL_MM_USE_DEFAULT=1 | |
# setup default config | |
perl -MCPAN -e shell # make sure to exit | |
# need to wait here | |
perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "Bundle::CPAN")' | |
perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "CPAN")' | |
perl -MCPAN -e 'CPAN::Shell->rematein("notest", "install", "Bundle::LWP")' |
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 | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function modulename_form_alter(&$form, &$form_state, $form_id) { | |
if (strpos($form_id, '_node_form') !== false ) { | |
// Add a cancel button. | |
$form['actions']['cancel'] = array( | |
'#type' => 'submit', |