Logo

TODAY I LEARNED

2 posts about #command-line

Heroku console (IRB) with no "multiline"

If you need to paste a script in the Heroku console (IRB) with multiple lines and you notice it's very slow to finish pasting all the code, you can use the --nomultiline tag to disable multiline and let you run your script faster

heroku run 'bundle exec rails c -- --nomultiline'

Learned by juan-lopez on Mar 1, 2021

973983 adforcodereview v3 0211021 c02 021121

Editing a file using cat

If you have to modify a file because any editor is present (vi, vim, nano, etc). you can use cat to do it:

$ cat > filename.ext
write or paste the content

ctrl+d

And that would be it! Super helpful when debugging flaky tests that only fail in the CI server

Learned by Edwin Cruz on Feb 24, 2021

973983 adforcodereview v3 0211021 c02 021121