Skip to content

Instantly share code, notes, and snippets.

View soriyath's full-sized avatar

soriyath

  • Leading Works SàRL
  • Switzerland
View GitHub Profile
@soriyath
soriyath / SUPPORTED
Created May 26, 2020 12:06
Content of /usr/share/i18n/SUPPORTED on docker.io/bitnami/minideb:buster
aa_DJ.UTF-8 UTF-8
aa_DJ ISO-8859-1
aa_ER UTF-8
aa_ER@saaho UTF-8
aa_ET UTF-8
af_ZA.UTF-8 UTF-8
af_ZA ISO-8859-1
agr_PE UTF-8
ak_GH UTF-8
am_ET UTF-8
@soriyath
soriyath / gist:13e66361c5d4c9b4f593f2058663dc6a
Last active February 14, 2017 01:28
How to return value from Task.async?
defmodule Test do
@doc ~S"""
iex> Test.download("http://www.six-swiss-exchange.com/data/market/statistics/corrections_2017-02-03.csv", "test.csv")
"""
def download(src, output_filename) do
Logger.info "Downloading #{src} -> #{output_filename}"
Task.async(getURL(src))
|> Task.await
|> Task.async(&(fn -> File.write!(output_filename, &1) end))