Skip to content

Instantly share code, notes, and snippets.

View adkron's full-sized avatar

Amos King adkron

View GitHub Profile
@adkron
adkron / keybase.md
Created June 12, 2019 23:18
keybase.md

Keybase proof

I hereby claim:

  • I am adkron on github.
  • I am adkron (https://keybase.io/adkron) on keybase.
  • I have a public key ASAqioCEgg_OcilKEpUqD7nHA6EuNfXlE7hPnYPS83lgBAo

To claim this, I am signing this object:

defmodule StructureOn.DCE.Connection.Watcher.Test do
use ExUnit.Case, async: true
use ExUnitProperties
alias StructureOn.DCE.Connection.Watcher, as: Subject
alias StructureOn.DCE.Connection.Supervisor
property "new addresses create new Connections" do
check all addresses <- unique_list_of(String.printable()),
max_runs: 50 do
for address <- addresses do
defmodule Nerves.Network.DHCPManager do
use GenServer
require Logger
import Nerves.Network.Utils
alias Nerves.Network.Types
@moduledoc false
defstruct context: :removed,
ifname: nil,
{
"default_stop_words": [
"defmodule",
"defrecord",
"defimpl",
"defexception",
"defprotocol",
"defstruct",
"def.+(.+\\\\.+).+do",
"^\\s+use\\s+",
defmodule DeviceHandler.Sync.Device do
alias DeviceHandler.Sync.Device.{Server}
alias DeviceHandler.Sync.{HubRegistry}
def new(interval, serial, options \\ []) do
options = Keyword.put_new(options, :name, HubRegistry.name(serial))
GenServer.start_link(Server, [interval, serial], options)
end
def child_spec([]) do
defmodule DeviceHandler.EventBus do
def new(opts) do
Registry.start_link(opts)
end
def child_spec([]) do
child_spec name: __MODULE__,
keys: :duplicate
end
defmodule DeviceHandler.EventBus do
def new(opts) do
Registry.start_link(opts)
end
def child_spec([]) do
child_spec name: __MODULE__,
keys: :duplicate
end
@adkron
adkron / impl.ex
Created September 13, 2017 14:52
defmodule Zipato.Sessions.Hub.Impl do
alias Zipato.Sessions.Behaviour
use Behaviour
@moduledoc """
Implementation for hub session
See `Zipato.Sessions.Hub` for more information.
"""
alias Zipato.Commands.{Authentication}

Lego Mindstorms EV3

CircleCI

This is the base Nerves System configuration for the Lego Mindstorms EV3 brick.

EV3 brick image
Image credit

| Feature | Description |

defmodule Zipato.Application do
@moduledoc false
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Zipato.Configuration,