rand(Ø)

> beautiful code & photos

about <

Posts tagged: console

MySQL: silent insecure password warning

I won't invent anything new here but I'll share a quick improvement on an answer I've found on Stack Overflow.

If you are doing batch actions and don't want to write in .mylogin.cnf file, there's the trick: use a process substitution!

$ mysqldump --defaults-extra-file=<(printf "[client]\nhost = host.rds.amazonaws.com\nuser = username\npassword = \$PassW0rd\$") \
    database > dump.sql

This also works for any other file input, like Docker env file run param:

> Continue Reading

ZSH: Open a new window using the last pwd

A friend of mine used ZSH on his Mac and since I know him and his .zshrc, I keep ZSH as the main CLI on my laptop, it works so well, I advise you to switch if still not 😛 .

But, I was very tired of typing a long cd command every time I wanted to open a new Terminal tab to execute a command in the same directory or close to where I was working; so I looked for a hack to get rid of this pain over the Internet and now, I'd like to share it with you.

The

> Continue Reading