skater coder

angela chng – Ruby on Rails / PHP web developer & skater girl in Singapore

  • blogabout stuff
  • aboutthis website
  • contactdrop a message

These are the posts from September 2008

September 25, 2008
Posted by roadburn

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

  • Install xVM Virtualbox
  • Go to Sun’s website http://dlc.sun.com/virtualbox/vboxdownload.html
  • Get the link of the ubuntu version of virtualbox and download it and install it in xterm
    eg.
    wget http://dlc.sun.com/virtualbox/2.0.2/virtualbox-2.0_2.0.2-36488_Ubuntu_hardy_i386.deb -O virtualbox-2.0_2.0.2-36488_Ubuntu_hardy_i386.deb
  • sudo dpkg -i virtualbox-2.0_2.0.2-36488_Ubuntu_hardy_i386.deb
  • sudo apt-get -f upgrade
  • sudo usermod -a -G vboxusers vboxuser

Create Windows Virtual Machine

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

No Comments

Posted Under Sharepoint

September 23, 2008
Posted by roadburn

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″>

No Comments

Posted Under Rails

September 21, 2008
Posted by roadburn

Rails Pagination

From :

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

Installation

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

Usage

@posts = Post.paginate :page => params[:page], :order => 'created_at DESC'
 
#In the view, page links can be rendered with a single view helper:
<%= will_paginate @posts %>

No Comments

Posted Under Rails

September 16, 2008
Posted by roadburn

Updating Ruby Gems and Upgrading Rails

For the gems

gem update –system

Upgrading Rails

gem install rails –version 2.1.1

No Comments

Posted Under Sharepoint


Posted by roadburn

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/

No Comments

Posted Under Sharepoint

September 11, 2008
Posted by roadburn

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

1 Comment

Posted Under Rails

September 4, 2008
Posted by roadburn

Sharepoint Tools

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

No Comments

Posted Under Sharepoint

  • CATEGORIES
    • Coding Tips
    • Food
    • Portfolio
    • Rails
    • Sharepoint
    • Wordpress

  • TAGS
    activities AD ADAM ajax architecture authentication bluehost books custom application custom form date design disk partition ECTS event id eventid moss forum guid hotfix iis imap keberos list id lists masterpage moss mysite profiles Rails rails 2.0 reporting services ruby Sharepoint sharepoint 2007 site templates site usage sql server 2005 time updates vhd virtual pc visual studio webparts workflow wss

Subscribe via RSS