Codeigniter pagination

January 15, 2011

CodeIgniter’s Pagination class is very easy to use, and it is 100% customizable, either dynamically or via stored preferences.

Sometimes when we clicked at the pagination number, the numbers still pointed at current page although it shows correct data. This happened because CI will take uri segment 3 as default pagination referrence. To customise CI to read the correct URI segment pagination :

$config['uri_segment'] = 4;

Now CI will recognise uri segment 4 as page referral. Pagination navigator will highlighted to the correct page when you click it now.

Happi pagination :)

Linux Graphical SVN Tools

October 1, 2010

rabbitvcs is like tortoisesvn

For those windows user that are familiar with TortoiseSVN (windows GUI for SVN) now there is similar tools for linux lovers : RabbitVCS.

Install in your Ubuntu with :

add rabbitvcs repository in your source
karmic & lucid
sudo add-apt-repository ppa:rabbitvcs/ppa

hardy, intrepid, jaunty
sudo vi /etc/apt/sources.list
deb http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu **DISTRIBUTION** main
signing key is: 1024R/34EF4A35

refresh our sources
sudo apt-get update

now RabbitVCS showed up in your Ubuntu Software Center.

SVN – Subversion

October 1, 2010

To manage our code in team development environment, we need a tool called version control system (vcs). One of the most used is Apache SVN.
It is a web based subversion which you can browse it using your web browser.

To install it in ubuntu (lucid) :

sudo apt-get install subversion libapache2-svn

next, we create out subversion repository

sudo svnadmin create /svn

edit our enabled apache2 module

sudo gedit /etc/apache2/mods-enabled/dav_svn.conf

add this at the end of the file

DAV svn
SVNPath /path/to/your/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user

create user for your repository

sudo htpasswd -cm /etc/apache2/dav_svn.passwd your_username

restart apache server to take effect

sudo /etc/init.d/apache2 restart

access your newly created repository using web browser

http://server/svn

Now your subversion repository server is ready to use

*to enable your user to commit to your repository, change permission to apache

sudo chown -R www-data:www-data /svn

some useful svn command for newbies HERE

Just use your PDF file as presentation and give it some Chuck Norris kick with Impress!ve. Impressive is a program that displays presentation slides. But unlike OpenOffice.org Impress or other similar applications, it does so with style. Smooth alpha-blended slide transitions are provided for the sake of eye candy, but in addition to this, Impressive offers some unique tools that are really useful for presentations.

It was written in Phyton, a feature-rich interpreted scripting language. Using Phyton platform independent makes this Impressive works on any machine including M$, Mac and Linux

Using Ubuntu:

sudo apt-get install impressive

Present it using :

impressive -t PageTurn presentation.pdf

For more information : CLICK HERE

as root

sudo apt-get install cvs

sudo apt-get install cvsd

*when prompted for repository location type: /myrepo

sudo cvsd-buildroot /var/lib/cvsd

sudo mkdir /var/lib/cvsd/myrepo

initialize the repository
sudo cvs -d /var/lib/cvsd/myrepo init

sudo chown -R cvsd:cvsd /var/lib/cvsd/myrepo

create a user and password
sudo cvsd-passwd /var/lib/cvsd/myrepo +username

change authentication method
sudo vi /var/lib/cvsd/myrepo/CVSROOT/config

-uncomment SystemAuth=no

to prevent connection refused
sudo vi /etc/cvsd/cvsd.conf

– change Listen * 2401 to Listen 0.0.0.0 2401

restart cvsd
sudo /etc/init.d/cvsd restart

test ur installation
cvs -d :pserver:username@localhost:/myrepo login

.

Follow

Get every new post delivered to your Inbox.