Archive of the day June 9, 2008

Linuxfeed: the Open Source world at your RSS feed!

2 commenti » Copincollato , Logbook , New 2 Comments »

From now on my personal blog is affiliated to the circuit LinuxFeed , for which I created a new ad hoc section, intended to contain news, tips and tricks and general information about Linux and Open Source world. Here is a brief presentation of the project you can read the URI http://linuxfeed.org/info :

LinuxFeed is a feed aggregator based on WordPress . Its purpose is to collect as much information as possible from the network quality, thus presenting itself as a filter between good information and rumors in computing. More specifically LinuxFeed focuses his attention on blogs that cover topics relating to Linux and free software (read Open Source) in general.

The staff, in addition to carefully choose the feeds to be included among its affiliates, reserves the possibility of cancellation of the same when their contents contravene the rules mentioned at the time of, or lapse in quality or centratezza topics desired.

Some more details:

  • The posts that are inserted into the directory LinuxFeed are linked directly to the author's site using the title of the post itself. This means that the posts are physically reach through links on our website unless you choose one of the small over the title. The majority of users will therefore be postponed to the author's site.
  • The author of the post is visible under the title of each article and is linked directly to the author's site and not to his posts on this site.
  • The categories and tags within the site and refer to these elements is maximized indexing of our site.

Google command line? Goosh!

Nessun commento » News No Comments »

On the Web there are now many applications of the Google API unorthodox - that things are completely different from that for which APIs have been designed - but this really deserves a prize for originality. This project goosh , an Ajax application that brings together Google functionality and interface of textual shell of Unix and Linux systems. With goosh you can do the research on the most important search engine in command line mode.

Operation is simple: just type your keywords directly to the prompt and press the Enter key to display the results. The input mode from the command line may seem awkward to those who do not work most of the time on remote servers, but. overcome the first few minutes of loss - find out what is comfortable to have complete control of an application directly from the cursor, without having to jump from window to window, or look far right icon.

For the complete list of available commands by typing the command `help`. Among the most useful commands are `lucky` to search in "I'm Feeling Lucky", `wiki` to search directly in Wikipedia , `news` to search through Google News and `clear` to clean up the output of the shell , just as in real systems, Unix and Linux.

What is he doing MySQL?

Nessun commento » MySQL , Open Source , Tips & Tricks No Comments »

If we want to obtain flight information on what you're doing our MySQL database without having to resort to graphical user interfaces or web applications, the command line as there is always help. Besides the usual `show processlist` - but it must be launched from the interface's text-mysql - here are two simple but holds essential for the proper monitoring of the mysqld daemon from a shell:

  1. extracts information at a glance the status of the db:
    mysqladmin -u root -p -i 5 status
  2. obtained specific information about the status of the db:
    mysqladmin -u root -p -i 5 extended-status -r | grep Com_select
    In this case, we extracted the number of select current. Changing the grep you can get over 200 different information!

Attention! In both cases you will be prompted for the password of the user `root` MySQL.

Stop Motion Rubik's Cube (Step a)

Nessun commento » YouTube No Comments »

Convert text in array of lines with constant PHP_EOL

Nessun commento » Open Source , PHP , Tips & Tricks No Comments »

When you write web applications in PHP happens very often having to handle the data in a text file. The best method to acquire data of this type is undoubtedly the ` file `, which just returns an array containing all lines of text files.

But as often happens to have anything to do with PHP script designed to run on older or abnormal situations, such as embedded servers that provide a limited range of functions PHP, or even scripts that process the lines of text at the same time where they produce it.

In these cases you can use a syntax less immediate but equally effective, resorting to `explode is the system constant PHP_EOL.

Here is a simple example:


 <? Php


 = <<< EOD $ txtMessage

 ROW # 1

 LINE # 2

 LINE # 3

 RIGA # 4

 EOD;


 $ ALines = explode (PHP_EOL, $ txtMessage);


 echo "<table border=\"1\"> \ n". PHP_EOL;


 foreach ($ aLines as $ strLine)

 {
  
 echo "<tr> \ n". PHP_EOL. "<td> \ n". $ strLine. "</ td> \ n". PHP_EOL. "</ tr> \ n". PHP_EOL;

 }


 echo "\ n". PHP_EOL;


 ?>

The result is as follows:

ROW # 1
LINE # 2
LINE # 3
RIGA # 4

The constant PHP_EOL equivalent to end of line character of the operating system on which we are working on the script: use this constant not only improves the readability of our program, but also its portability.