Skip to content

Instantly share code, notes, and snippets.

View orderthruchaos's full-sized avatar

Brett DiFrischia orderthruchaos

View GitHub Profile
@orderthruchaos
orderthruchaos / grove_led_bar_with_rotary_controller.ino
Created October 5, 2016 20:56
Concatenation of files for the Grove LED bar controller with the Bean+ project.
/* This is a concatenation of the following files from
https://github.com/Seeed-Studio/Grove_LED_Bar (LGPL):
- Grove_LED_Bar.h
- Grove_LED_Bar.cpp (less the #include for the above header)
and the code from
https://www.hackster.io/karel/grove-led-bar-controller-with-the-bean-c3b81e
(less the #include for the above header) with corrections from the
comments. */
defmodule GCM.Pusher do
use GenStage
# The maximum number of requests Firebase allows at once per XMPP connection
@max_demand 100
defstruct [
:producer,
:producer_from,
:fcm_conn_pid,
:pending_requests,
defmodule GCM.PushCollector do
use GenStage
# Client
def push(pid, push_requests) do
GenServer.cast(pid, {:push, push_requests})
end
# Server