Installing Git from source in Edgy Eft

download the necessary packages:

sudo apt-get install comerr-dev \
libcurl4-openssl-dev \
libidn11-dev \
libkadm55 \
libkrb5-dev \
texi2html \
texinfo \
docbook2x \
libosp5 \
libxml-namespacesupport-perl \
libxml-sax-expat-perl \
libxml-sax-perl \
opensp

download the latest stable release from here:

http://kernel.org/pub/software/scm/git/

i preferred the global install, and went for

make prefix=/usr all doc info

and then

sudo make prefix=/usr install install-doc

(the INSTALL file suggests adding “install-info” to the end of that (to install the docs in INFO format), but I kept getting an error during the make task- no dice.)

type

git –version

and make sure you’ve gotten a nice response. If so, done! If not, post a comment here and/or ask around on the git forums.

if you’d like to be adventurous: rather than downloading the latest release candidate, consider going all the way and building from the latest version of the git repository (after getting another version of git to work, natch).

Read more from the Uncategorized category. If you would like to leave a comment, click here: 1 Comment. or stay up to date with this post via RSS, or you can Trackback from your site.
Social Bookmark : Technorati, Digg, de.licio.us, Yahoo, Blinkbits, Blogmarks, Google, Magnolia.

Extending Ruby’s Time class with ‘before?’ and ‘after?’

The mixin below allows comparison between two Time objects using the more intuitive and natural-sounding before? and after? methods.

Some examples (using Rails’ ActiveSupport Time extensions or (preferred) the ‘units’ gem):

2.minutes.ago.after? Time.now # =>; false
Time.now.before? 2.hours.from_now # => true
module BeforeAndAfter

  LEFT_SIDE_LARGER  = 1
  RIGHT_SIDE_LARGER = -1
  EQUAL             = 0
  ACCEPTABLE_SWITCH_VALUES = [ :before , :after ]

  def before?(input_time)
    return comparison(:before, input_time)
  end

  def after?(input_time)
    return comparison(:after, input_time)
  end

private

  def comparison(switch, input_time)

    raise ArgumentError, "bad comparison switch" unless ACCEPTABLE_SWITCH_VALUES.include? switch

    comparison_result = self <=> input_time

    case comparison_result
      when LEFT_SIDE_LARGER
        case switch
          when :before
            return false
          when :after
            return true
        end
      when RIGHT_SIDE_LARGER
        case switch
          when :before
            return true
          when :after
            return false
        end
      when EQUAL
        return false
    end
  end
end

Time.send :include , BeforeAndAfter

Read more from the ruby category. If you would like to leave a comment, click here: 2 Comments. or stay up to date with this post via RSS, or you can Trackback from your site.
Social Bookmark : Technorati, Digg, de.licio.us, Yahoo, Blinkbits, Blogmarks, Google, Magnolia.

Hello world!

Becoming a web developer is like finally learning to ride a bike then realizing that real bikes only have two wheels. So, you take off the training wheels and try again, and again, and again. You can finally ride, but now all your friends are buying dirt bikes. Read more

Read more from the Uncategorized category. If you would like to leave a comment, click here: 3 Comments. or stay up to date with this post via RSS, or you can Trackback from your site.
Social Bookmark : Technorati, Digg, de.licio.us, Yahoo, Blinkbits, Blogmarks, Google, Magnolia.