Skip to content

Instantly share code, notes, and snippets.

View SergiuSavva's full-sized avatar
🏠
Working from home

Sergiu SergiuSavva

🏠
Working from home
View GitHub Profile
@SergiuSavva
SergiuSavva / 1. aws-mfa.sh
Last active February 29, 2024 11:13
This Bash script helps in generating and configuring temporary AWS credentials using Multi-Factor Authentication (MFA) for added security. It reads the MFA device ARN from the specified AWS profile in the credentials file, prompts the user for the MFA token code, and then obtains the temporary credentials from AWS Security Token Service (STS). F…
#!/bin/bash
# Set the profile you want to use for MFA
SOURCE_PROFILE="default"
MFA_PROFILE="mfa"
# Read the MFA device ARN from the credentials file
MFA_DEVICE_ARN=$(aws configure get mfa_device_arn --profile $SOURCE_PROFILE)
if [ -z "$MFA_DEVICE_ARN" ]; then
echo "Error: MFA device ARN not found in the ~/.aws/credentials file for profile $SOURCE_PROFILE"
<?php
class MigratePikolorArticleMigration extends PikolorBase {
public function __construct($arguments) {
parent::__construct($arguments);
$text_format = 'full_html';
$this->language = 'ro';
$this->file_source = drupal_realpath('public://') . '/posts';
<?php
/**
* Add full_html where format is null
*/
function mymodule_core_update_7110() {
$widgets = array('text_textarea', 'text_textarea_with_summary');
$translate_fields = variable_get('smartling_translate_fields', array());
$fields_need_update = array();