Today I Learned

TIL, 2017-05-16

  • A bunch of things regarding authentication tokens.
  • Strava API: I think I can build a better client. Hehe.
  • AS: extract_options! extracts the options from a given set or arguments. When no options are available, return a blank Hash. Problem is it mutates. But with kwargs, this isn’t really helpful any more.
  • Array#wrap is a thing.
Array.wrap(nil)       # => []
Array.wrap([1, 2, 3]) # => [1, 2, 3]
Array.wrap(0)         # => [0]
  • Deploying: bundle exec cap staging deploy && say 'deployed' &
  • Silent deploy: nohup sh -c "(bundle exec cap staging deploy --dry-run && say 'done deploy') &"
  • Run a shell command from nohup via 1sh -c.
  • The & at the end of a shell command will background the command.
  • Text to speech has different voices. I will try using Ava’s voice.
  • NAT/Network Address Translation–converts the addresses in a local subnet to the true IP address in the “public” subnet.

Extra Time

  • Exercise. You need to have the energy to make the most out of all that free time that you have. Exercise increases energy levels.
  • Reading. The stuff you learned in school might be useless. Real-life knowledge like finances, social skills, diet, fitness. You can become an expert in any field by only reading 3 books about that field (expert meaning you know more than 99% of the population).
  • Meditation: You are training your brain which thoughts to focus on and what things to do. This is the one habit that can change your life.
  • Passion: Everyone has something that triggers a child-like state of excitement. The other three give you the ability to do this. Reading–gives you the knowledge to improve on your craft. Meditation–gives you the head space for creativity. Exercise–gives you the energy to work on your passion.
  • When you work on your hobby long enough, it can become a source of income.

This project is maintained by daryllxd