Skip to content

Instantly share code, notes, and snippets.

View martonpe's full-sized avatar
👾

Peter B Marton martonpe

👾
View GitHub Profile
resource "template_file" "luigi-config" {
template = "cloud-config/luigi.yml"
vars {
default = "${file("cloud-config/default.yml")}"
...
}
}
resource "template_cloudinit_config" "luigi-config" {
gzip = true
#!/usr/bin/env ruby
require 'net/http'
def convert_currency(from_curr, to_curr)
doc = Net::HTTP.get('www.google.com', "/finance/converter?a=1&from=#{from_curr}&to=#{to_curr}")
regexp = Regexp.new("(\\d+\\.{0,1}\\d*)\\s+#{to_curr}")
regexp.match doc
$1.to_f
end