Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable @typescript-eslint/no-explicit-any */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import * as joi from 'joi'
type ArrayType<T> = T extends (infer U)[] ? U : never
declare module 'joi' {
interface Root {
extend(...extensions: Array<joi.Extension | joi.ExtensionFactory>): this
@seanbehan
seanbehan / commands-bash.bash
Last active January 23, 2018 03:16
Export and import a Heroku database from one app to another app
heroku addons:create heroku-postgresql:hobby-basic
heroku pg:wait
heroku info
heroku pg:backups capture
heroku maintenance:on
export DB_DUMP=`heroku pg:backups public-url -a export-app-name`
heroku pg:backups restore $DB_DUMP DATABASE_URL -a import-app-name
heroku pg:copy DATABASE_URL HEROKU_POSTGRESQL_PURPLE_URL