We recommend Digital Ocean for hosting your sites. Free $10 credit when you sign up.
Thanks to Jeremy Cron for contributing this example.
require "rest_client" task :minify do html_file = "index.html" html_min_file = "html/index.html" response = RestClient.post "https://html-minifier.com/raw", {:input => File.open(html_file).read} File.open(html_min_file, "w").write(response) end
Click on the language of your choice:
I'd love to add more examples in your favourite programming language, so feel free to send them my way. Email andychilton at that gmail place in the sky or tweet to me @andychilton.