Thursday, March 27th, 2008

Disabling the Laptop TouchPad in Ubuntu Linux

Here’s a quick tip on disabling the touchpad on the Ubuntu Linux distro. It’s been bugging me for a while now that I have to use a non-gnome native solution to disabling my touchpad qsynaptics written in QT.

For those who are impatient and just want the quick instructions, I recommend that you install synclient, and issue a synclient TouchPadOff=1 usually SHMConfig is already on and this would be enough - in addition, synclient is usually installed by default (it is in Ubuntu Gutsy Gibbon).

More…

7 comments » Filed under Linux by rvdavid at 23:10.

back to top

Saturday, March 15th, 2008

Stay away from Bloated Class Methods, actually, bloated ANYTHING!

Why are there so many examples of bloated PHP methods out there?! I see a lot of bloated methods being used in examples through sites like phpclasses.org and a very large chunk of a project I’ve recently picked up which a few developers have worked on. Guys! remember! There is no good reason to bloat your methods to over 10-20 lines long and on the rare occasions that you do exceed 10 - 20 lines it would be more the exception to the rule as opposed to being the rule itself!

Let’s not forget what classes and its methods are supposed to be: Classes are blueprints for specialist components and their methods are singular actions which address one to a few (2 - 3 at most!) procedures at a time whether it be through the use of other classes or just through simple logic!

More…

4 comments » Filed under PHP Programming by rvdavid at 0:38.

back to top

Tuesday, March 11th, 2008

Importing SQL dumps into MySQL through Command line

Perhaps it’s because I’ve been in maintenance mode for a little bit that I’ve forgotten how to import a SQL file generated by applications like mysqldump into an existing database, but earlier today while dumping existing data from DevScripts and trying to install it on our testing server, I drew a complete blank.

So I guess this is more a note for me and anyone else who has a tendency to forget nifty little tricks like this one.

A quick way to duplicate MySQL databases is to do the following:

More…

3 comments » Filed under General by rvdavid at 12:09.

back to top

Monday, March 3rd, 2008

Instant or Passwordless SSH-ing in Linux

Well, to be “correct” the title of this should have been “how to add your key to the list of authorized public keys on a remote or local linux machine”, but being a newbie like myself, I would not have known to search for it. If I wanted to find out about logging in automatically to a remote machine using a generated public key, I myself would have used “Passwordless SSH” - so there you go.

To get started, I’ll assume that you have OpenSSH set up (it’s setup by default… well usually) and that your remote machine has OpenSSH-server set up.

If not, then do the following on the remote machine:

$ sudo aptitude install openssh-server

More…

Leave a comment » Filed under Linux by rvdavid at 23:16.

back to top

Credits:

© rvdavid blogs: Web Development | Powered by WP 2.3.1

Tree theme modified based on headsetoptions