Category: daily learning

  • Refinements in Ruby: in map: super: no superclass method

    I was trying out refinements to see if they would help clean up some parsing code. I liked defining a couple of methods for the String class to respond to, but really didn’t want them as permanent monkey patches on String. And so, I had a pipe mapping module with refinements: module PipeMapping refine String…

  • rails (4) generate migration behaviors I forget to use

    When I’m generating a migration, I usually don’t go any deeper than specifying column_name:data_type on the command line, and often I only use the command line to generate the file itself. I don’t know that the other options really save all that much typing, but stopping to think about the other options for a few…

  • Applescripts to Mute or Unmute Lync

    In preparation for hooking up Lync muting and unmuting to separate hotkeys, I wanted to make sure that my scripts no longer toggled the mute button, but only muted or unmuted. For that to work, I needed to retrieve the current state of the checkbox. set theCheckbox to checkbox 5 of splitter group 1 of…