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 middy, { MiddlewareObj } from '@middy/core' | |
import httpErrorHandler from '@middy/http-error-handler' | |
import httpHeaderNormalizer from '@middy/http-header-normalizer' | |
import httpJsonBodyParser from '@middy/http-json-body-parser' | |
import { APIGatewayProxyEventV2, APIGatewayProxyStructuredResultV2, Handler } from 'aws-lambda' | |
import { zodValidator } from 'middy-zod-validator' | |
import { ZodSchema, z, infer as ZInfer } from 'zod' | |
import { isHttpError } from 'http-errors' |
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
# AWS AppSync GQL directives | |
# | |
## Scalars come from here: | |
# https://raw.githubusercontent.com/aws-amplify/amplify-cli/master/packages/amplify-graphql-types-generator/awsAppSyncDirectives.graphql | |
# https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html | |
# | |
## Directives came from a GitHub issue here: | |
# https://github.com/apollographql/eslint-plugin-graphql/issues/263 | |
## And comparing with the JSON output of | |
# https://docs.aws.amazon.com/appsync/latest/APIReference/API_GetIntrospectionSchema.html |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <libpq-fe.h> | |
#include <sys/time.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <string.h> | |
// channel to LISTEN on | |
const char *listenChannel = "foo"; |
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 cdk = require("aws-cdk-lib"); | |
import ec2 = require("aws-cdk-lib/aws-ec2"); | |
import elastic = require("aws-cdk-lib/aws-elasticache"); | |
import rds = require("aws-cdk-lib/aws-rds"); | |
import es = require("aws-cdk-lib/aws-elasticsearch"); | |
import ecs = require("aws-cdk-lib/aws-ecs"); | |
import s3 = require("aws-cdk-lib/aws-s3"); | |
import elbv2 = require("aws-cdk-lib/aws-elasticloadbalancingv2"); | |
import route53 = require("aws-cdk-lib/aws-route53"); | |
import certificateManager = require("aws-cdk-lib/aws-certificatemanager"); |
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
/* eslint-disable @typescript-eslint/no-explicit-any */ | |
/* eslint-disable @typescript-eslint/no-non-null-assertion */ | |
import * as sst from '@serverless-stack/resources'; | |
import { Function, getStack } from '@serverless-stack/resources'; | |
import { Match, Template } from 'aws-cdk-lib/assertions'; | |
import { useBaseInfra } from 'stacks'; | |
import { test } from 'vitest'; | |
import { Functions } from './functions'; | |
function TestStack({ stack }: sst.StackContext) { |
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
#!/usr/bin/env bash | |
# This script fetches and builds libx264, libav, rtmpd and their dependencies. | |
# you may have to add /usr/local/lib to /etc/ld.so.conf | |
# BASEDIR = build directory (default current dir) | |
# PREFIX = install directory (default /usr/local) | |
if [ -z "$BASEDIR" ]; then | |
BASEDIR=`pwd` | |
fi |
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
/** | |
* CloudFormation exports. Unique per-region. | |
*/ | |
export enum StackExports { | |
GREMLIN_PORT = "GremlinPort", | |
GREMLIN_ENDPOINT = "GremlinEndpoint" | |
} | |
/** |
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
#!/usr/bin/perl | |
# ansi2unicode.pl | |
# 4/18/2007 | |
# | |
# convert an ANSI file to unicode, suitable for display in irssi/mirc or html | |
# usage: ansi2unicode.pl inputfile [-tc] [-o outputmode] [outputfile] | |
# -t = terminal output, no color | |
# -o = output mode, currently only html and irc supported, default is irc | |
# outputfile = filename to output to if html specified |
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
#!/bin/bash | |
# installs plenv, perl, carton, cpanminus, sets up environment in .bash_profile | |
# from https://github.com/tokuhirom/plenv#readme | |
PLENV_PERL_VERSION='5.18.1' | |
if [[ -n "$PERL_MB_OPT" ]]; then | |
echo "You must unset your local::lib environment variables first" |
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
FROM lambci/lambda:build-python3.8 | |
# ref: https://chromium.googlesource.com/chromium/src.git/+refs | |
ARG VERSION | |
ENV VERSION ${VERSION:-master} | |
LABEL maintainer="Mischa Spiegelmock <me@mish.dev>" | |
LABEL chromium="${VERSION}" | |
WORKDIR / |
NewerOlder