Thursday, January 31st, 2008

Setting up Ubuntu on my new 19 inch LG S900-U.CPS1A Notebook/Work Rig!

Well it’s been a very busy 14 days for me, I’ve recently acquired a new work rig and in the process of converting my desktop to a local file server. The main goal for me acquiring this monstrous 19 incher is just so I can move around (mind you this mofo is huge, so my moving around is limited) my house and not just stay couped up in the study. A couple of important things happened when I got this laptop:

More…

2 comments » Filed under General by rvdavid at 0:28.

back to top

Thursday, January 17th, 2008

YeahConsole a lighter yakuake alternative for xubuntu linux

This week, I’d like to talk about YeahConsole, an alternative to yakuake, or a more “native yakuake” for xubuntu and ubuntu. You could also look at it as a lighter terminal emulator wrapper for those who do not really like installing extra kde packages just to use yakuake.

More…

4 comments » Filed under Linux Applications by rvdavid at 19:21.

back to top

Wednesday, January 16th, 2008

Buy and manage your own domains!

A valuable lesson I’ve learnt from a mishap late last year with one of my domains. It is a common “bonus offer” for many web hosting companies to provide a “free” domain name either for the first year or for the lifetime of your account with the hosting company. But what would happen if things go sour?

More…

2 comments » Filed under General by rvdavid at 7:13.

back to top

Sunday, January 13th, 2008

MyBlogLog’s misreported adsense clicks

I use mybloglog to keep track of activity on my blog. This includes statistics on links that a user clicks on. The idea behind tracking this is pretty simple. A user clicks on a link or an ad which then gets recorded by mybloglog as an anonymous click same concept as google’s adsense tracking system.

More…

Leave a comment » Filed under Rants by rvdavid at 1:51.

back to top

Sunday, January 13th, 2008

Execute Linux commands in PHP by using backticks

You can execute linux commands within a php script - all you have to do is put the command line in backticks (`).

Recently, I had to upload an archive to a server which did not allow ssh. For files that I need to transfer, I just package them up in a neat archive and transfer the archive file via scp. Not having ssh access however, I uploaded the archive file via ftp and created a script which extracts the file the file looks like the following:
More…

3 comments » Filed under General Notes by rvdavid at 1:29.

back to top

Thursday, January 10th, 2008

PHP HTTPRequest Class

Note: This is is a quick example of a very basic HTTP Request Class in PHP. This would be a nice, practical introduction to classes for someone who has been looking for a place to start.

Problem: By default, request data in PHP is handled by using Super Globals ($_POST, $_GET, $_COOKIES). Globals are bad for several reasons (outside the scope of this example google here). In an effort to remedy this, we need a way to encapsulate the request data into an object. By doing this, we are centralising access to request data through the one channel - the HTTP Request object.

Class Name:HTTPRequest

Responsibilities:

  • Store “request data” in GPC order.
  • Store additional “request data” outside of the super globals referenced by a key.
  • Read stored “request data” by referencing a key.
  • Internally clean request data by handling magic_quotes_gpc and then adding slashes.
  • Allow access to data stored in GET, POST and COOKIE super globals.

Collaborators: Any - the request object is used by any other class or function that requires access to the request data.

More…

2 comments » Filed under Classes & Examples by rvdavid at 11:49.

back to top

Credits:

© rvdavid blogs: Web Development | Powered by WP 2.3.1

Tree theme modified based on headsetoptions