Tell Ruby Program to Wait some amount of time

Like this: The num_secs value can be an integer or float. Also, if you’re writing this within a Rails app, or have included the ActiveSupport library in your project, you can construct longer intervals using the following convenience syntax:

How do you format code in Visual Studio Code (VSCode)?

The code formatting is available in Visual Studio Code through the following shortcuts: On Windows Shift + Alt + F On Mac Shift + Option + F On Linux Ctrl + Shift + I Alternatively, you can find the shortcut, as well as other shortcuts, through the ‘Command Palette’ provided in the editor with Ctrl +Shift+ P (or Command + Shift + P on Mac), and then searching for format document. For unsaved snippets Open command palette (Win: F1 or Ctrl+Shift+P) Find ‘Change Language … Read more

Which python am I using?

First I modified my $PATH: sudo nano /etc/paths so that /Library/Frameworks/Python.framework/Versions/3.6/bin was not being invoked. I made sure my paths were in the right order so that python looked for /usr/local/bin/python3 and /usr/local/bin/python2 first to force the issue. However, $ python3 –version still returned Python 3.6.0, though brew says python3 3.6.2 already installed. brew doctor to the rescue: homebrew recommended a couple things. python was incorrectly symlinked so … Read more