Skip to content

Instantly share code, notes, and snippets.

View kevinkoltz's full-sized avatar
💭
typing...

Kevin Koltz kevinkoltz

💭
typing...
  • Forest Lake, IL
View GitHub Profile
@kevinkoltz
kevinkoltz / ex_dump.ex
Created December 8, 2020 20:32
EEx helper for inspecting Elixir terms in HTML
defmodule ExDump do
@moduledoc """
Helper for dumping variables in HTML for easy inspection.
"""
use Hapi.Constants.SharedConstants
use Phoenix.HTML
@doc """
Dumps a term to html in a easy to read format.
"""
defmodule SeleniumServer do
@moduledoc """
Runs Selenium Server from a process.
Can be supervised from the application, for example:
# Define workers and child supervisors to be supervised
children = [
...other children
# Start selenium server process for Hound
@kevinkoltz
kevinkoltz / date_time_2.ex
Created April 13, 2019 00:29
Datetime2 Type for Ecto
defmodule Ecto.Adapter.MSSQL.DateTime2 do
@moduledoc """
Temporary solution to fix microsecond precision in MSSQL UTC datetime2
values. MSSQL defaults to 7-digit microseconds, whereas `Calendar` only
supports 6.
Note: Ecto 3.0 will remove the microseconds by default with `:utc_datetime`.
See https://github.com/livehelpnow/tds_ecto/issues/65 for more info.
"""