Skip to content

Instantly share code, notes, and snippets.

@jclusso
Created March 4, 2021 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jclusso/cd1fd80ea7e48fee437e9e7c03481f2e to your computer and use it in GitHub Desktop.
Save jclusso/cd1fd80ea7e48fee437e9e7c03481f2e to your computer and use it in GitHub Desktop.
Convert AWS EC2 Pricing from Hourly to Monthly
// ==UserScript==
// @name AWS EC2 Pricing Hourly to Monthly
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hourly to Monthly Pricing
// @author You
// @match https://aws.amazon.com/ec2/pricing/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
setTimeout(function() {
$("td").each(function() {
var el = $(this)
var match = el.text().match(/\$(\d.\d+) per Hour/)
if (match != null) {
var amount = parseFloat(match[1]);
el.html('$' + (amount * 750).toFixed(2) + ' per Month');
}
})
}, 2000);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment