This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Influxinator.InfluxConnection do | |
use Instream.Connection, otp_app: :influxinator | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Influxinator.Db.LocationMeasurement do | |
use Instream.Series | |
series do | |
database "influxinator" | |
measurement "location" | |
tag :identifier | |
tag :job_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = %Influxinator.Db.LocationMeasurement{} | |
data = %{data | tags: %{data.tags | identifier: 17, job_id: 22}} | |
data = %{data | fields: %{data.fields | lat: "test", long: "test", speed: 100}} | |
Influxinator.InfluxConnection.write(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require("path"); | |
module.exports = { | |
stories: ["../src/**/*.stories.js", "../src/**/*.stories.mdx"], | |
webpackFinal: async (config) => { | |
const aliases = { ...config.resolve.alias }; | |
config.output["globalObject"] = "this"; | |
config.node = { | |
fs: "empty", | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { render } from '@testing-library/react'; | |
import CorrelationText from './CorrelationText'; | |
import '@testing-library/jest-dom/extend-expect'; | |
describe('<CorrelationText />', () => { | |
describe('more visits than clicks', () => { | |
it('should x times visits state', () => { | |
const props = { | |
data: { | |
clicks: 4400, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pattern matching | |
# Definition for singly-linked list. | |
# | |
# defmodule ListNode do | |
# @type t :: %__MODULE__{ | |
# val: integer, | |
# next: ListNode.t() | nil | |
# } | |
# defstruct val: 0, next: nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Events.NewLead do | |
@moduledoc """ | |
Module use to process the "new_lead" event. | |
example event: | |
%{ | |
"tags" => [], | |
"gmaid" => "USA_22", | |
"state" => "NY", | |
"action" => "new_lead", |
OlderNewer