Code, Strings, and Keys

    • About Thomas Powell
    • Account
    • It’s been [0] days since [program] last updated
    • Login
    • Password Reset
    • Pianist / Accompanist / Music Director Resume
    • Reading List 2025
    • Register
    • Running Gear – Shoes, Treadmill, and Bandages
    • Site Map
Illustration of a bird flying.
  • Moving back to the last cursor position in line in vim

    Ever have a stray keystroke in vim that jumped to somewhere you didn’t intend to go? Two backticks “ will jump to the exact position of where you were. Two single quotes ” will jump to the first non-blank character where you were. This also works for moving to the beginning of a line/cursor position…

    May 20, 2014
  • Moving Static Files to the Assets Pipeline (upgrading from 3.0 to 3.1+)

    For those who have done the upgrade, this is probably second nature: Recently stumbled upon static files in the public/javascripts directory and wanted to get them moved to the $RAILS_ROOT/app/assets/ directory. This RailsCast, 282 Upgrading to Rails 3.1 provides most of the notes you need on doing this. The first key is to include: config.assets.enabled…

    May 19, 2014
  • Enums in ActiveRecord 4.1 and options_for_select

    Update: This StackOverflow answer provides a better way to use a drop-down with enums. I could’ve sworn I tried that, but maybe not. I discovered something interesting about the way ActiveRecord 4.1 enums work. If you’re trying to use them with options_for_select, you may need to do some little acrobatics with your enums. Assume your…

    May 16, 2014
←Previous Page
1 … 75 76 77 78 79 … 317
Next Page→

Code, Strings, and Keys

Proudly powered by WordPress