Skip to content

Instantly share code, notes, and snippets.

View heyitsjames's full-sized avatar

James Rasmussen heyitsjames

  • Salt Lake City, Utah
View GitHub Profile
defp dedupe_chunk(chunk) do
chunk
|> Enum.reduce(%{}, fn(row, acc) -> Map.put(acc, row["email"], row) end)
|> Enum.reduce([], fn({_, values}, acc) -> [values | acc] end)
end
@heyitsjames
heyitsjames / depths.get.ex
Created June 9, 2020 19:49
If you want depths, you shall have them
defmodule Mix.Tasks.Depths.Get do
@moduledoc """
Fetches all the depths
"""
use Mix.Task
def run(_args) do
IO.puts(
"Your eyes are endless pools reflecting every dying star and every emergent " <>
@heyitsjames
heyitsjames / gist:288dcd865098cc3c730de0eed77509ae
Created May 25, 2021 05:13
35-39 Males competing in 2021 Ironman Coeur d'Alene
ABNEY DAVID MALE 37 US
ADAMS BROCK MALE 36 US
ADAMS MICHAEL MALE 35 US
ALDERSON ROBERT MALE 36 US
ALLEN ERIC MALE 37 US
ALLEN JOE MALE 37 US
AMADIO ANTHONY MALE 39 US
ANDERSON CHASE MALE 39 US
ANDERSON DEREK MALE 39 US
ANDERSSON TOBIAS MALE 36 US
@heyitsjames
heyitsjames / gist:c223376587a0900a7e4d8daa83aff7dd
Created May 25, 2021 05:30
35-39 Males competing in 2021 Ironman 70.3 Hawaii
ABBOTT ERIC MALE 35 USA
AIDO RICARDO MALE 39 PRT
ALFRED RYAN MALE 38 USA
ANDRADE JONATHAN MALE 35 USA
ANDREAS WITTMANN MALE 39 DEU
ARECHAVALETA RICHARD MALE 38 USA
AYTON TRISTAN MALE 37 AUS
BAIER-LENTZ MORITZ MALE 35 DEU
BARRAGAN ALFREDO MALE 37 USA
BARRAGAN ZAMUDIO JESUS EDUARDO MALE 35 MEX
defmodule MyApp.Encoder do
@moduledoc """
General implementation for the Jason encoder to be used in Ecto schemas
"""
defmacro __using__(opts) do
drop_fields = Keyword.get(opts, :drop, [])
quote do
defimpl Jason.Encoder, for: [__MODULE__] do
#! /usr/bin/env python3
import sys
hosts_path = '/Users/james/Desktop/hosts'
def main(argv):
is_commented = False
hosts_file = open(hosts_path, 'r')
hosts_file_contents = hosts_file.readlines()
web.1 | started with pid 41
web.1 | =ERROR REPORT==== 8-Dec-2024::22:22:15.256128 ===
2024-12-08T22:22:15.256730+00:00 reddit-viewer[b'reddit-viewer-69c87b96d4-66vhp']: web.1 | Invalid -name given to erl,
web.1 | =ERROR REPORT==== 8-Dec-2024::22:22:15.256128 ===
web.1 | Invalid -name given to erl,
2024-12-08T22:22:15.269857+00:00 reddit-viewer[b'reddit-viewer-69c87b96d4-66vhp']: web.1 | 22:22:15.268 [warning] node not running in distributed mode. Ensure the following exports are set in your rel/env.sh.eex file:
web.1 |
web.1 | #!/bin/sh
web.1 |
web.1 | export RELEASE_DISTRIBUTION=name
import Config
# config/runtime.exs is executed for all environments, including
# during releases. It is executed after compilation and before the
# system starts, so it is typically used to load production configuration
# and secrets from environment variables or elsewhere. Do not define
# any compile-time configuration in here, as it won't be applied.
# The block below contains prod specific runtime configuration.
# ## Using releases
%{
title: %{
approved_at_utc: nil,
removed_by_category: nil,
category: nil,
author_flair_background_color: nil,
thumbnail_width: nil,
no_follow: false,
view_count: nil,
stickied: false,
defmodule Dozer.Integrations.Yardi do
@moduledoc """
Yardi is a 3rd party app that many of our customers use, and they do lots of things related to
vendor payments and property management.
The main purpose for this integration is that while our mutual customers use Rabbet to track and
approve documents for payment, we don't have any way to actually initiate the money transfers
and tie that back to balance sheets etc. So we offer this and other similar integrations (Avid, Nexus)
to allow the customers to pay out balances and tie into their accounting systems.