My Recent Pastes (263 and counting)

Pastes by Josh Goebel (263 and counting)

Pages:

Below are the 8 most recent pasties by Josh Goebel.

June 30, 2006
3:35AM EDT
by Josh Goebel

## caches svn locally to avoid doing a full checkout of your app each time

# written/pulled together by Dreamer3 (Josh Goebel)
# based on http://pastie.caboo.se/1738 by octopod

June 30, 2006
3:30AM EDT
by Josh Goebel

## caches svn locally to avoid doing a full checkout of your app each time

# HOW TO USE

# require 'config/cache_svn'

June 30, 2006
2:19AM EDT
by Josh Goebel

      def latest_revision
        configuration.logger.debug "querying latest revision..." unless @latest_revision
        repo = configuration.repository
        until @latest_revision
          match = svn_log(repo).scan(/r(\d+)/).first

June 27, 2006
11:17PM EDT
by Josh Goebel

# OutputCompression
# Rails output compression filters 
# 
# Adds two classmethods to ActionController that can be used as after-filters: 
# strip_whitespace and compress_output. 

June 27, 2006
11:16PM EDT
by Josh Goebel

# OutputCompression

June 26, 2006
9:55PM EDT
by Josh Goebel

        function distance_of_time_in_words(minutes) {
          if (minutes.isNaN) return "";
          minutes = Math.abs(minutes);
          if (minutes < 1) return ('less than a minute');
          if (minutes < 50) return (minutes + ' minute' + (minutes == 1 ? '' : 's'));

June 26, 2006
7:48AM EDT
by Josh Goebel

require "open-uri"
require "tempfile"
require "stringio"

module MiniMagick

June 25, 2006
6:11PM EDT
by Josh Goebel

class Article < ActiveRecord::Base
  belongs_to :feed
  validates_uniqueness_of :guid
  validates_length_of :url, :minimum => 1

Previous page