A fun way to practice or learn a language is to solve puzzles that are available on the Internet. One of those problems is the Ugly Numbers problem. It is special in that it, like many other problems, has multiple solutions with varying levels of efficiency.

The Ugly Number problem is: find the nth ugly number. Continue reading “AlGOrithm Adventure 1 – Ugly Numbers Algorithm and Dynamic Programming”

While setting up my vimrc for ruby development I ran into the following error:

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/specification.rb:17:in `require': incompatible library version - /System/Library/Frameworks/Ruby.frame
work/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/stringio.bundle (LoadError)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/specification.rb:17:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb:1230:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb:1230:in `<module:Gem>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb:116:in `<top (required)>'
        from <internal:gem_prelude>:4:in `require'
        from <internal:gem_prelude>:4:in `<internal:gem_prelude>'

This is apparently an issue with mojave and appears to be related to using the system’s ruby vs the rvm.

By adding the following to my vimrc I was able to cease the error:

let $RUBYHOME=$HOME."/.rvm/rubies/default"
set rubydll=$HOME/.rvm/rubies/default/lib/libruby.dylib

Typically when I work on code changes I try to keep things to a single commit. This makes it so I won’t need to squash my commits into one (you gotta keep that history clean). It even makes updating pull-requests rather easy with a force push. I have seen many people be befuddled by this kind of workflow. Hopefully this post and the examples within will help future developers who run into problems. Continue reading “linuxnippet #4: Splitting big commits”

Like many people I have a repository that contains a vast majority of my configuration files, or dot files (because a lot of them start with a period). Doing this allows me to set up a new environment very quickly. While it probably is not standard practice it should be! At least it feels like a right of passage. Continue reading “linuxnippet #3: Running vim commands at execution”

This is the first of a new collection of posts that are dedicated to reviewing tutorials I find while learning my own thing. A lot of tutorials are outdated or wrong. “You mean things on the Internet can be wrong?!” In my field I run into a lot of tutorials. Ones that are large enough to warrant a review, either being very bad or very good, I will post about. This one is about installing Laravel. Continue reading “Tutorial Review: Laravel Quick Start”

Ever need to find a file that contains some text? Hate trying to remember how to do it so you google it all the time? This post is one I reference often. I do not recommend spending your valuable brain-space on useless info. Just remember how to find the answer and you’ll be golden.

This one is a quickie because it’s mainly for me to remember: Continue reading “linuxnippet #2: Finding files in command line”

Hey kids. Do you ever find yourself working at your terminal, with the dull glow barely revealing the letters on your keyboard, attempting to do the same thing to all the regions in your company? Your friends have, in quiet whispers, mentioned pssh, screen, and tmux as the best trip you’ll ever have. As a smart developer you cautiously dabbled in them at first. Maybe you found what you were looking for, but then in the thick of things you found yourself banging your head on that same keyboard. The trip just wasn’t worth it.

What are we talking about again?

Continue reading “linuxnippet #1: multi-region tmux oh my!”

These are just basic notes for me because I will forget.

This uses the Swift-YouTube-Player Cocoapod from https://github.com/gilesvangruisen/Swift-YouTube-Player

Copy the instructions here to get it installed using pods.

It isn’t up-to-date with swift 2.0 yet so copy the changes here

Then (using the information from here) make sure the VTPlayer.html file is included in the Pods (YouTubePlayer) resources list:

  • Click on Pods ‘project’
  • Click on YouTubePlayer under TARGETS
  • Click on Build Phases
  • Click on the plus sign (add build phase)
  • Add a Copy Files build phase
  • Set Destination to Resources and add the YTPlayer.html file

Rebuild all the things.