Skip to content

Instantly share code, notes, and snippets.

View theoephraim's full-sized avatar

Theo Ephraim theoephraim

View GitHub Profile
@theoephraim
theoephraim / dmno-config-schema-features.md
Last active April 4, 2024 15:29
dmno.dev sneak peek #1 ✨

DMNO config engine example

👋 Hello there!

This is a little sneak peek of what we're working on over at DMNO / 👂 "domino"

Our first release will be an open source tool called the “dmno config engine” that lets you define a schema for all of the config (env vars) in your entire stack. If you've done any kind of development on a team or of larger systems, you've certainly struggled with managing secrets and configuration. It may not be your #1 pain point, but I guarantee it's something that comes up on every project, over and over again. And even when you've hacked together a system that you're relatively happy with, it involves a ton of custom glue to hold it all together and you can probably imagine something better.

We're hoping to solve that once and for all. We think this could become the default way that we all configure our javascript/typescript apps. We actually think this could just be the way we deal with config for all kinds of apps for all kinds of languages and

@theoephraim
theoephraim / dmno-example-config.mts
Last active March 22, 2024 19:38
dmno.dev configuration schema example
import {
defineConfigSchema, DmnoBaseTypes, NodeEnvType, configPath, dmnoFormula, switchByDmnoEnv, switchByNodeEnv,
valueCreatedDuringDeployment, createDmnoDataType, injectPlugin, ValidationError, registerPlugin,
EncryptedFileStorePlugin
} from '@dmno/core';
import { OnePasswordDmnoPlugin } from '@dmno/1password-plugin';
// plugins can be used to create reusable functionality and can reference config items in their initialization
const encryptedSecrets = new EncryptedFileStorePlugin({ name: 'local-secrets', key: configPath('LOCAL_SECRETS_KEY') });
@theoephraim
theoephraim / nmbl-example.nmbl
Last active October 23, 2023 19:26
NMBL (no more brackets lang) templating example
// single line comment - by default not rendered into html
//! but adding a leading "!" preserves the comment and renders as normal HTML comment
/* block comments work too
and can be multiple lines */
/*! same exclamation applies to control preserving in html */
// no brackets used to specify a node in the tree, just write tag or component name, ex:
div
CustomComponentName
@theoephraim
theoephraim / flightplan.coffee
Created December 22, 2015 15:50
Capistrano style deploys using flightplan
plan = require 'flightplan'
moment = require 'moment-timezone'
_ = require 'lodash'
nconf = require 'nconf'
request = require 'superagent'
async = require 'async'
# TODO: move to /lib like the others
require './src/run-init'