candland

@candland rss self
December 15th 2011

Include a Module Based on Rails Environment

Not sure if this is the best way to do things. But I want to include modules into a class based on the rails environment.

First I used the rails config store, Configurator.

module MyApp
  class Application < Rails::Application


      
November 23rd 2011

Send Commands From VIM to Tmux Pane

I’ve started using Tmux w/ VIM as my primary work flow. I installed the tslime.vim plugin, which will send highlighted commands to another pane, but I wanted to send ad-hoc commands, like :!. I added this function to the tslime.vim file, I’m sure there is a better way, but that’s what I did for now…

November 8th 2011

ITerm2 TMux and Vim Setup

Setup

  • Install MacVim
  • Install ITerm2
  • Install Tmux: brew install tmux
  • Install Tmux Patch for copy to OSX: tmux-MacOSX-pasteboard
  • Change shell to zsh
      chsh -s /bin/zsh && sudo chsh -s /bin/zsh username
      

Tmux Config

This sets some nice things for tmux. Of note, changing the default prefix to Ctrl+a and setting up the copy patch…

October 30th 2011

Twitter and Facebook Popup Windows

I often find my self needing to add Twitter and Facebook share buttons. Usually not using the default widget icons. To do that you need some functions to call window.open and some jQuery to tie the links to those functions. These functions also encode the passed parameters…

September 21st 2011

Some Rails Tips and Tricks

After doing a lot of refactoring today I wanted to note a few useful things I’ve picked up.

load the rails environment for rake

If you need to run a rake task that need access to the Rails models, etc. add the :environment dependency