YAML to dotenv
Convert this YAML config file to a .env file.
Start file
vimgolf:
logging:
level: INFO
app:
postgres:
host: !ENV {POSTGRES_HOST}
port: !ENV {POSTGRES_PORT}
pulsar:
host: !ENV ${PULSAR_HOST}
port: !ENV ${PULSAR_PORT}
namespace: vimgolf
topic: !ENV ${PULSAR_TOPIC}
End file
POSTGRES_HOST=
POSTGRES_PORT=
PULSAR_HOST=
PULSAR_PORT=
PULSAR_TOPIC=
View Diff
1,12c1,5
< vimgolf:
< logging:
< level: INFO
< app:
< postgres:
< host: !ENV {POSTGRES_HOST}
< port: !ENV {POSTGRES_PORT}
< pulsar:
< host: !ENV ${PULSAR_HOST}
< port: !ENV ${PULSAR_PORT}
< namespace: vimgolf
< topic: !ENV ${PULSAR_TOPIC}
---
> POSTGRES_HOST=
> POSTGRES_PORT=
> PULSAR_HOST=
> PULSAR_PORT=
> PULSAR_TOPIC=
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 113 remaining solutions by signing in and submitting your own entry
#114 lovebigwei / @lovebigwei - Score: 170 - 12/18/24 @ 07:54
:v/POST\\<BS>|PUL/d<CR>:$<BS>%s/\v/<BS>(\w<BS><BS>)<Left>\<BS>.+<Right>{<BS>{\w+}<Left><Left>\<BS><Left><Left><Left>(<Right><Right><Right><Right><Right>)<BS><BS><BS><BS><BS><BS><BS>\zn{<BS><BS><BS><BS><Left><BS>{-}\zs{<BS>}<BS>{<Left><BS>n<BS>e<Left><Left><Left><Left><Left><Left><BS>*<BS>-<BS><Right><Right><Right><Right><Right><Right><Right><Right><BS><BS><BS><BS><BS>)<Left>.=<BS><BS><Left><Left><Left>.<Right><Right><Right><Right><Right><Right><Right><Right><Right><Left>}<BS>{<BS>{<BS>{<Left>\<Right><Right>(\w+)}<BS>\}/\v<BS>2=/g<CR>:wq<CR>
0 comments