Today I Learned

TIL, 2018-03-22, Finishing the Deploy, and Experimenting with Redis Cache for Pomodoros

Musings

  • I look through Eloquent Ruby and look at the delegation chapter. I have to think about this theory where I need to know how to implement things. Do I implement via inheritance, delegation, mixins, dependency injection? I think I’ll study this topic for a few hours because I need to know, I think they are the same thing, but done multiple ways.
  • Also beginning to write about my first blog post on Design Patterns in Ruby: Adapter. I’ll put a first example on terminal-table and see if it works. It’s a small enough example that I like it.
  • Ruby NaN: Not a number. You get it by dividing 0.0 by 0.0.
  • Ruby Delegation Patterns: Inheritance, Composition, Mixins.
  • Redis flushing: redis-cli flushall
  • time outside of commands to discover how long they actually took!
  • Redis caching: Substantial gains: 2 seconds for a Pomodoro all, and about .3 seconds for a Pomodoro yesterday. I still have to refine my findings, though.
  • Vim: Folding in Ruby.
    • let ruby_fold = 1 “ A way to make ruby folding
    • let ruby_foldable_groups = '#' “ Granularizing ruby folds to occur only in the comments.
    • set nofoldenable if you want to disable folding
    • Reference
    • hi Folded ctermbg=016 Change fold color
    • cterm is color terminal.

Musings on Deployment and all the Bugs

  • I need to su - deploy to have access to ruby?
  • No node found for webpacker: https://github.com/nodejs/node-v0.x-archive/issues/3911
  • nvm installation, then link to nvm.
  • No webpacker.yml found, copy from your local.
  • No webpack found - npm install -g webpack. Other fix: Add capistrano-npm.
  • No binstubs: bundle install -binstubs.
  • npm i webpack -g
  • Weird npm directory: I’m not using the correct node? Ubuntu node is really different. Upgrade process.
  • Autoloading lib in Rails 5? Reference.
  • Nginx config file: I have to understand it better. Reference

This project is maintained by daryllxd