Skip to content

Instantly share code, notes, and snippets.

View albertocorrales's full-sized avatar

Alberto Corrales Garcia albertocorrales

View GitHub Profile
@albertocorrales
albertocorrales / blogger_to_jekyll.rb
Last active July 10, 2022 14:22
Migrate Blogspot blog to Github pages
#!/usr/bin/env ruby
#
# Convert blogger (blogspot) posts to jekyll posts
#
# Basic Usage
# -----------
#
# ./blogger_to_jekyll.rb feed_url
#
# where `feed_url` can have the following format:
@albertocorrales
albertocorrales / aws_assume_role_mfa.ps1
Last active August 16, 2021 21:36
PowerShell script to setup your AWS profile to assume a role with MFA
$MfaDeviceArn = "#YOUR_MFA_DEVICE_ARN#"
$DurationInSeconds = 28800
$OpsProfileName = "ops"
$MfaProfileName = "mfadev"
$MfaCode = Read-Host -Prompt 'Please, input your MFA code'
$TempCredentials = aws sts get-session-token --duration-seconds $DurationInSeconds --serial-number $MfaDeviceArn --token-code $MfaCode --profile $OpsProfileName | ConvertFrom-Json
Write-Output "Updating your profile '$MfaProfileName' with your new temporary credentials..."