This file contains hidden or 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 node | |
# This script is for getting the DB schema from a database that requires SSL verification by providing a certificate | |
# For example, AWS RDS instances will require this | |
# This script takes a database url and a path to the certificate, then runs the pg_dump command | |
# | |
# This is very useful for tools like dbdiagram.io | |
const { exec } = require("child_process"); | |
const path = require("path"); |
This file contains hidden or 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
const { exec } = require("child_process"); | |
const path = require("path"); | |
const dbUrl = process.argv[2]; | |
const certPath = process.argv[3]; | |
if (!dbUrl) { | |
console.error(`No DB URL given`); | |
help(); | |
} |
This file contains hidden or 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
const unitTypes = [ // https://public-dhhs.ne.gov/nfocus/HowDoI/howdoi/usps_address_unit_types.htm | |
'APT', | |
'BLDG', | |
'BSMT', | |
'DEPT', | |
'FL', | |
'FRNT', | |
'HNGR', | |
'KEY', | |
'LBBY', |
This file contains hidden or 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
const states = { | |
'Alabama': 'AL', | |
'Alaska': 'AK', | |
'Arizona': 'AZ', | |
'Arkansas': 'AR', | |
'California': 'CA', | |
'Colorado': 'CO', | |
'Connecticut': 'CT', | |
'Delaware': 'DE', | |
'Florida': 'FL', |
This file contains hidden or 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
# Get editor completions based on the config file | |
"$schema" = 'https://starship.rs/config-schema.json' | |
# Inserts a blank line between shell prompts | |
add_newline = true | |
continuation_prompt = "↪ " | |
command_timeout = 1000 | |
# Replace the ">" symbol in the prompt with "λ" |