This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function debounce(func, delay) { | |
var alreadyScheduled; | |
var lastTimer; | |
return function() { | |
if (alreadyScheduled) { | |
clearTimeout(lastTimer); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
uri = URI('https://pkgstore.datahub.io/core/country-list/data_csv/data/d7c9d7cfb42cb69f4422dec222dbbaa8/data_csv.csv') | |
countries = Net::HTTP.get(uri) | |
countries = countries.split("\r\n").drop(1) | |
countries = countries.map do |country| | |
country.split(",").last | |
end.join(",") |