Isaac Sloan - Web Developer, Photographer, Musician and Citizen of Earth
Banner700

Vim: Find/Replace in projects using ack

November 30, 2012

Since moving to vim from Sublime Text 2 the one thing I have been less than happy with is find and replace in files. This seems to be the accepted solution:

:args app/views/*/*
:argdo %s/search/replace/ge | update
Vim: Find/Replace in projects using ack

Taylor-Realtors

January 29, 2013
Thumb_screenshot_1_29_13_11_39_am

Taylor-Realtors is a Montana Real Estate Firm. The site features fast keyword and advanced searching using the Sphinx Engine with Thinking-Sphinx and multiple MLS feeds. One of challenges I faced during development was parsing the many types of files given to us through MLS providers because they don't all use the same format and they only provide images for the last couple days of listings so all the rest

Taylor-Realtors

Running php on an ngnix server set up for Rails.

December 05, 2012

Its super easy to set up a server for php if you're running apache as your default web sever. However, I recently had to figure out the how to run php an Ubuntu server which has been set up for rails using nginx and passenger. One option is to run apache on a different port and then route that through nginx but this method requires a lot of memory. The solution I choose was to use php-fpm.

apt-get install php5-fpm
Running php on an ngnix server set up for Rails.

Combining Word Press with a Rails App using nginx proxy_pass

January 15, 2013

Despite our love for Ruby we sometimes find ourselves with clients who want to keep their Wordpress blog in conjunction with their shiny new Rails app. The most obvious way to do this is to run it on a different subdomain (blog.domain.com), but this presents an SEO problem because your blog which is often one of the most useful tools for attracting people is now on a different domain.

The Solution:

Combining Word Press with a Rails App using nginx proxy_pass

Pygments.rb

October 30, 2012
Thumb_681054main_pia16105-full_full_copy

Here is some useful code for syntax highlighting. Borrowed from Ryan Bates

module ApplicationHelper
  class HTMLwithPygments < Redcarpet::Render::HTML
    def block_code(code, language)
      sha = Digest::SHA1.hexdigest(code)
      Rails.cache.fetch ["code", language, sha].join('-') do
        Pygments.highlight(code, lexer: language)
      end
    end
  end

  def markdown(text)
Pygments.rb