Skip to content

Instantly share code, notes, and snippets.

@kyleparisi
Created March 20, 2020 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyleparisi/cfdefe5fc1be5f82d96c8eb53914704b to your computer and use it in GitHub Desktop.
Save kyleparisi/cfdefe5fc1be5f82d96c8eb53914704b to your computer and use it in GitHub Desktop.
Get ip that starts with, using elixir
Enum.filter(interfaces, fn i -> List.starts_with?(Tuple.to_list(elem(i, 0)), [10, 242]) end) |> hd |> elem(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment