Skip to content

Instantly share code, notes, and snippets.

View maxx-coffee's full-sized avatar
💭
Coding for funsies

Maxx Coffee maxx-coffee

💭
Coding for funsies
View GitHub Profile
defmodule Influxinator.InfluxConnection do
use Instream.Connection, otp_app: :influxinator
end
defmodule Influxinator.Db.LocationMeasurement do
use Instream.Series
series do
database "influxinator"
measurement "location"
tag :identifier
tag :job_id
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)
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",
};
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,
#pattern matching
# Definition for singly-linked list.
#
# defmodule ListNode do
# @type t :: %__MODULE__{
# val: integer,
# next: ListNode.t() | nil
# }
# defstruct val: 0, next: nil
defmodule Events.NewLead do
@moduledoc """
Module use to process the "new_lead" event.
example event:
%{
"tags" => [],
"gmaid" => "USA_22",
"state" => "NY",
"action" => "new_lead",