Skip to content

Instantly share code, notes, and snippets.

View microadam's full-sized avatar

Adam Duncan microadam

View GitHub Profile
@microadam
microadam / Dockerfile
Created February 8, 2023 13:36
android-sdk
FROM openjdk:8
# Install Git and dependencies
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y file git curl zip libncurses5:i386 libstdc++6:i386 zlib1g:i386 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists /var/cache/apt
# Set up environment variables
@microadam
microadam / example
Created February 10, 2023 10:45
dynamodb
const generateUpdateQueryExpression = (fields: Partial<TableStructure>) => {
const exp = {
UpdateExpression: "SET",
ExpressionAttributeNames: {} as ObjectWithProperties,
ExpressionAttributeValues: {} as ObjectWithProperties,
};
Object.entries(fields).forEach(([key, item]) => {
const keyParts = key.split(".");
const valueKey = keyParts[keyParts.length - 1];
const attributeNames = `#${keyParts.join(".#")}`;