msgbartop
Useful MOSS 2007 and Ruby and Rails stuff
msgbarbottom

25 Sep 08 Setting up Ubuntu with minimal GUI and Sun xVM VirtualBox

Being a linux newbie, took a while to figure out what to do. So I’m documenting the steps, might be useful for anyone else setting up a ubuntu virtualbox.

I’m basically setting up a Ubuntu host to run windows 2003 virtual machines.

Steps to get it all up and running

  1. Install Ubuntu Server
  2. Install minimal GUI (xorg, xterm, openbox)
  3. Install virtualbox
  4. Create windows virtual machine

Install Ubuntu Server

  • Download the Ubuntu Server Editition from http://www.ubuntu.com/getubuntu/download
  • Burn the downloaded image onto a CD using something like Nero
  • Pop the CD into your soon to be Ubuntu server
  • Boot from the disc and select the default/appropriate options to install Ubuntu

Install minimal GUI

  • in the command line type
    sudo apt-get install xorg xterm openbox
  • to run the GUI type
    startx

Install xVM Virtualbox

Create Windows Virtual Machine

  • in xterm, type
    virtualbox
  • Click on “New” button and just follow the instructions to install your virtual machine! :)

Tags: , ,

23 Sep 08 Restful_authentication Internet explorer cannot logout http_basic problem

If you’re getting a security box popup like I did, here’s the link to the solution

http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/97981fedc00d98fa/3e435bd3e66952c7?lnk=raot

Basically, just edit /lib/authenticated_system.rb, and add ‘(:xml, :json)’

def access_denied
      respond_to do |format|
        format.html do
          store_location
          redirect_to new_session_path
        end
        format.any(:xml, :json) do
          request_http_basic_authentication ‘Web Password’
        end
      end
    end

 

Make sure your <head> tag has this too:

<META HTTP-EQUIV=”Pragma” CONTENT=”no-cache”> 
<META HTTP-EQUIV=”Expires” CONTENT=”-1″>

Tags:

21 Sep 08 Rails Pagination

From :

http://github.com/mislav/will_paginate/tree/master

Installation

script/plugin install git://github.com/mislav/will_paginate.git

Usage

@posts = Post.paginate :page => params[:page], :o rder => 'created_at DESC'

In the view, page links can be rendered with a single view helper:
<%= will_paginate @posts %>

Technorati Tags:

Tags: , ,

16 Sep 08 Updating Ruby Gems and Upgrading Rails

For the gems

gem update –system

Upgrading Rails

gem install rails –version 2.1.1

Tags: ,

16 Sep 08 Using JQuery on Rails

http://ennerchi.com/projects/jrails

and how to get it working with authenticity tokens

http://blog.lawrencepit.com/2008/09/04/unobtrusive-jquery-rails/

11 Sep 08 Ruby strftime Reference

%a  weekday name.
%A  weekday name (full).
%b  month name.
%B  month name (full).
%c  date and time (locale)
%d  day of month [01,31].
%H  hour [00,23].
%I  hour [01,12].
%j  day of year [001,366].
%m  month [01,12].
%M  minute [00,59].
%p  AM or PM
%S  Second [00,61]
%U  week of year (Sunday)[00,53].
w  weekday [0(Sunday),6].
W  week of year (Monday)[00,53].
x  date (locale).
%X  time (locale).
%y  year [00,99].
%Y  year [2000].
%Z  timezone name.

http://snippets.dzone.com/tag/strftime#post1643

http://sg.php.net/strftime

Tags: , ,

04 Sep 08 Sharepoint Tools

http://www.sharepoint-tools.de/en/BrowseCategory/10/Development.html

Tags:

This blog is multi language by p.osting.it's Babel