Elixir: Miscellaneous Notes 
# Filtering files in a directory by filename
angelcool@fedora-laptop$date
Fri Apr 12 12:02:42 PM PDT 2024
angelcool@fedora-laptop$iex
...
iex(90)> "/home/angelcool/Downloads" \
...(90)> |> Path.join("**/*.rpm") \
...(90)> |> Path.wildcard \
...(90)> |> Enum.filter(fn fname -> String.contains?(Path.basename(fname),"dbeaver") end)
["/home/angelcool/Downloads/dbeaver-ce-24.0.2-stable.x86_64.rpm"]


# Making an HTTP GET request
iex(18)> :inets.start()
:ok
iex(19)> :ssl.start()
:ok
iex(20)> :httpc.request(:get, {'https://www.angelcool.net', []}, [ssl: :httpc.ssl_verify_host_options(true)], [])
...


Comments
Comments are not available for this entry.
2025 By Angel Cool