Skip to content

Instantly share code, notes, and snippets.

View bmartin2015's full-sized avatar

Ben Martin bmartin2015

View GitHub Profile
@bmartin2015
bmartin2015 / result_stream.ex
Created March 21, 2019 15:28
Consume a paginated API in Elixir via Stream.resource/3
defmodule ResultStream do
# Start the stream
def new(url) do
Stream.resource(
fn -> fetch_page(url) end,
&process_page/1,
fn _ -> nil end
)
end

Keybase proof

I hereby claim:

  • I am bmartin2015 on github.
  • I am benmartin (https://keybase.io/benmartin) on keybase.
  • I have a public key ASAiLxstp0kttj2pfJbYRpWX69RtgX0vhl0HISMUBw6JEAo

To claim this, I am signing this object:

@bmartin2015
bmartin2015 / privacy_policy.md
Created October 24, 2017 15:11
TGRI, LLC Privacy Policy

Privacy Policy

Your privacy is very important to us. Accordingly, we have developed this Policy in order for you to understand how we collect, use, communicate and disclose and make use of personal information. The following outlines our privacy policy.

  • Before or at the time of collecting personal information, we will identify the purposes for which information is being collected.
  • We will collect and use of personal information solely with the objective of fulfilling those purposes specified by us and for other compatible purposes, unless we obtain the consent of the individual concerned or as required by law.
  • We will only retain personal information as long as necessary for the fulfillment of those purposes.
  • We will collect personal information by lawful and fair means and, where appropriate, with the knowledge or consent of the individual concerned.
  • Personal data should be relevant to the purposes for which it is to be used, and, to the extent necessary for those purposes, should be accurate,
@bmartin2015
bmartin2015 / tos.md
Last active October 24, 2017 15:09
TGRI, LLC Terms of Service

Web Site Terms and Conditions of Use

1. Terms

By accessing this web site, you are agreeing to be bound by these web site Terms and Conditions of Use, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. The materials contained in this web site are protected by applicable copyright and trade mark law.

2. Use License

Permission is granted to temporarily download one copy of the materials (information or software) on TGRI, LLC's web site for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not: ** modify or copy the materials;