Skip to content

Instantly share code, notes, and snippets.

View marcusgadbem's full-sized avatar

Marcus Gadbem marcusgadbem

View GitHub Profile
@marcusgadbem
marcusgadbem / Azkfile.js
Last active August 29, 2015 14:16
UMRUM - Azkfile
/**
* Documentation: http://docs.azk.io/Azkfile.js
*/
// Adds the systems that shape your system
systems({
umrum: {
// Dependent systems
depends: ["redis", "mongodb"],
// More images: http://images.azk.io
@marcusgadbem
marcusgadbem / errors.js
Created September 28, 2015 17:33
React component pattern with a Store
export class APIRateLimitError extends Error {
constructor(err) {
super('API Rate limit.');
}
}
@marcusgadbem
marcusgadbem / keybase.md
Created July 14, 2020 13:48
Keybase verification

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@marcusgadbem
marcusgadbem / adapter-dynamodb.ts
Last active November 8, 2022 20:36
aws-sdk - dynamodb client + test
import { DynamoDBClient, DynamoDBClientConfig } from '@aws-sdk/client-dynamodb'
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb'
// @aws-sdk (v3) has keepAlive enabled by default
export const DynamoClient = new DynamoDBClient({});
const marshallOptions = {
convertEmptyValues: false,
removeUndefinedValues: false,
convertClassInstanceToMap: false,
@marcusgadbem
marcusgadbem / mokable_task.ex
Created October 23, 2023 15:48 — forked from nuxlli/mokable_task.ex
A mockable Task module for elixir (with mox)
# lib/my_project/task.ex
defmodule MyProject.Task do
@moduledoc """
TODO: run async task on tests will not work, with unpredictable side effects
"""
@adapter Keyword.get(
Application.compile_env(:my_project, __MODULE__, []),
:adapter,
Task