Skip to content

Instantly share code, notes, and snippets.

View scarstens's full-sized avatar
🌟
Automating workflows.

Seth Carstens scarstens

🌟
Automating workflows.
View GitHub Profile
@scarstens
scarstens / Dockerfile
Created April 10, 2022 03:34
Dockerfile for production deploys
# Double-container Dockerfile for separated build process.
# If you're just copy-pasting this, don't forget a .dockerignore!
# We're starting with the same base image, but we're declaring
# that this block outputs an image called DEPS that we
# won't be deploying - it just installs our npm deps
FROM node:14-alpine AS deps
# If you need libc for any of your deps, uncomment this line:
# RUN apk add --no-cache libc6-compat
@scarstens
scarstens / nodemailer-smpt-connection-test.mjs
Created August 12, 2022 16:54
Nodemailer SMTP connection test
// Make sure you run this file from the project root
// or use `npm run email`
import nodemailer from "nodemailer";
import * as dotenv from "dotenv";
import path from "path";
dotenv.config({
// path: path.resolve(path.basename(path.dirname(process.cwd())), ".env"),
});
console.log(
"Setup email config: ",
import { useRouter } from "next/router";
const function getAssetTypeFirstLetterUppercase(){
const { query } = useRouter();
// Format first letter to be capitalized
const assetType = query?.type
? query?.type[0].toUpperCase() + query?.type.slice(1)
: undefined;
}