Free Software Category Archive

Show package versions in Ubuntu

Sometimes the packages are in the ubuntu repositories are not updated in its latest version, to know which is the version of a package we can write the following command:

  packagename apt-cache showpkg 

Now, if you have a small server where we installed packages like apache, mysql and php would be as follows:

Apache:

  apache2-v 

MySQL:

  mysql - version 

PHP

  php - version 

With this information we can see that is installed the version required for various reasons, whether for compatibility, security, etc.

, , , ,

1 Comment

Print a category tree in PHP

When we're creating some kind of CMS is customary to classify content into categories, where they can have children, grandchildren, great-etc.

For example: Our table category has an id, name, father's, where the latter is the id of another category.

planchette

Therefore we can complicate print that list correctly. To resolve this we can make a small function:

 sacarHijos function ($ id_padre, $ level)
 (
     $ Result = mysql_query ("SELECT id, name, parent FROM categories WHERE parent = $ id_padre");

     if (mysql_num_rows ($ result))
     (
	 $ Level = $ level .'-----';
	 while ($ d = mysql_fetch_row ($ result))
	 (
	     / / Print tree categories
	     echo $ level. '>'. $ d [1];

	     / / Call the function again to print other children
	     sacarHijos ($ d [0], $ level);
	 )
     )
 )

Of course when you call the function sacarHijos the value that is passed in the variable $ level may be empty, eg

 / / We tell the function to print the daughters of the father 00 categories, namely the root.
 sacarHijos (00 ,'');

This allows us to print a tree or hierarchy of categories to print in tables, list of menu options, etc.

,

No Comment

Ubuntu Server 8.04 Logwatch

Logwatch is a monitoring system logs and system logs for a given period of time creates a report analyzing areas that you specify (ssh, apache, etc.) Also can indicate the details of the required data. Logwatch is easy to use and has the function of sending the report to an email address.

To install and configure it in ubuntu write to the console:

 sudo apt-get install Logwatch

Logwatch.conf Now edit the file, in this case editaré with Vim:

 sudo vim / usr / share / Logwatch / default.conf / logwatch.conf

Search MailTo option and indicate the email address which Logwatch send the report, be amended as follows:

 MailTo = root Updates to MailTo = ejemplo@ejemplo.com

Now every day there will come a report logs to your e-mail, only warnings and is analyzing the data it provides.

, , ,

No Comment

Multiescritorio in Windows with "Virtual Dimension"

virtual For those who do not know that it is "multiescritorio" means having more than one workspace (desktop) on an operating system, facilitating the organization of windows and ease of working.

Because the college classes I was obliged to install Windows XP on my computer, but he missed the usefulness multiescritorio of Gnome. Looking around I found a "Virtual Dimension", an application that performs what he wanted.

Many features of this software, but it highlights some:

  • Infinite number of desktops. (Same as gnome)
  • Different background image for each desktop.
  • Perzonalización of Hotkeys.
  • Is Free Software.

I was struck by the last feature. (XD)

The main site of "Virtual Dimension" is: http://virt-dimension.sourceforge.net/ , there can download this utility.

, ,

No Comment

Brief Introduction to GNU / Linux

GNULinux The last was held on May 2 Release Party Ubuntu 9.04 and Mandriva Spring 2009 , which were to make different presentations, one was doing it and I played on Introduction to GNU / Linux. For people who want the presentation will leave a link to download.

Presentation - Introduction to GNU / Linux

If you want to see some photos in an album can visit the following link:

Event Photos

, , , ,

No Comment