My Recent Pastes (263 and counting)

Pastes by Josh Goebel (263 and counting)

Pages:

Below are the 15 most recent pasties by Josh Goebel.

October 06, 2009
10:40AM EDT
by Josh Goebel

# automatically allow string to remove $ and , from values
# before converting to numerics also parse "k" into "000"
class String
  
  alias old_to_f to_f

February 28, 2009
5:03AM EDT
by Josh Goebel

test

December 16, 2008
12:03AM EDT
by Josh Goebel

require 'monitor'
require 'set'

module ActiveRecord
  # Raised when a connection could not be obtained within the connection

December 15, 2008
10:25PM EDT
by Josh Goebel

      # Verify active connections and remove and disconnect connections
      # associated with stale threads.
      def verify_active_connections! #:nodoc:
        clear_stale_cached_connections!
        @connections.each do |connection|

December 15, 2008
10:24PM EDT
by Josh Goebel

      # Verify active connections and remove and disconnect connections
      # associated with stale threads.
      def verify_active_connections! #:nodoc:
        clear_stale_cached_connections!
        @connections.each do |connection|

December 05, 2008
5:24PM EDT
by Josh Goebel

  namespace :app do
    namespace :symlinks do

      set :app_symlinks, {}
  

December 03, 2008
11:54PM EDT
by Josh Goebel

Capistrano::Configuration.instance(:must_exist).load do 
  namespace :dwell do
    namespace :linode do

      task :create_deploy_user do

December 02, 2008
7:58AM EDT
by Josh Goebel

        input = "\n"
        sudo "passenger-install-apache2-module" do |ch,stream,out|  
          next if out.chomp == input.chomp || out.chomp == ''  
          print out  
          ch.send_data(input) if out =~ /enter/i  

November 27, 2008
8:10PM EDT
by Josh Goebel

require 'set'
require 'rubygems'
require 'yaml'
require 'logger'
require 'facets/array'

November 25, 2008
7:16PM EDT
by Josh Goebel

      def send_file(path, options = {}) #:doc:
        raise MissingFile, "Cannot read file #{path}" unless File.file?(path) and File.readable?(path)

        options[:length]   ||= File.size(path)
        options[:filename] ||= File.basename(path) unless options[:url_based_filename]

November 22, 2008
4:54AM EDT
by Josh Goebel

class Parser < ActiveRecord::Base

  def self.all
    @@all||=Parser.find(:all, :order => "name")
  end

November 22, 2008
4:29AM EDT
by Josh Goebel

      # Rebuild load path directory cache
      def reload!
        @paths = {}

        templates_in_path do |template|

November 22, 2008
12:15AM EDT
by Josh Goebel

  public
  
  # hack for rails 2.2.2
  def with_output_buffer(lines=[], &block)
    block.call

October 06, 2008
5:07AM EDT
by Josh Goebel

##
## $Rev: 115 $
## $Release: 2.6.2 $
## copyright(c) 2006-2008 kuwata-lab.com all rights reserved.
##

May 18, 2008
2:33AM EDT
by Josh Goebel

## after 

def discount_by_item(apple)
  full_quantity = 0
  discount_quantity = 0

Next page