Archive

Posts Tagged ‘Tutorial’

Pseudo-Console using Flex 3

September 5th, 2009 No comments

Today I’ll show you a way to realize a console-like component in Flex 3 (3.4). This is really a personal way to handle the problem, I can’t garantee it is a best practice, I can garantee it works.

gnomeTerminal

Let’s move forward…

Read more…

Restore Grub after Windows installation

August 6th, 2009 No comments

I’ve just installed Windows Seven so I’ve lost ma Grub boot window…

let’s see how we can do that…

Read more…

Twittering from command line (known also as passing parameters to aliases via bash shell)

May 26th, 2009 No comments

This tutorial is pretty simple. We’ll see how to setup our linux box to send messages to our twitter account using the command line.

As always click on “Read More”.
Read more…

Categories: Linux, Tutorial Tags: , , ,

Listening to custom events from itemRender with Flex 3.3 ( bubble events )

May 18th, 2009 No comments

Server Controls like DataGrid,DataGridView , DataList etc have other controls inside them.
Example an DataGridView can have an TextBox or an button inside it.
These Child Controls can not raize events by themselves,but they pass the event to the parent control (DataGridView), which is passed to the page as event.
This process is known as EventBubbling.


Read more…

w32codecs ( medibuntu ) and converting rm to avi

April 30th, 2009 No comments

Support for WMV, RealMedia and other formats has been bundled into the w32codecs package. This package is not available from the Ubuntu repositories due to licensing and legal restrictions.
Read more…

Categories: Linux, Tutorial, Ubuntu Tags: , ,

Tips: Disabling Firefox 3 smart location bar.

December 19th, 2008 No comments

firefox

If you, like me, have an old fileserver then you should use this trick because the Firefox 3 smart location bar can really rape your hard disk [valley girl talk mode]…like totally…[/valley girl talk mode]

Read more…

A proper ‘ls’ output? I need it.

November 6th, 2008 No comments

So when you use the list option you have this output:

pippo@pippo-laptop:~$ ls -gGh
totale 175M
-rw-r--r-- 1 175M 2008-11-05 23:15 Barack.Obama.Presidential.Victory.Speech.HDTV.XviD-XOXO.avi
-rw-r--r-- 1  25K 2008-11-05 17:18 Barack.Obama.Presidential.Victory.Speech.HDTV.XviD-XOXO.srt
drwxr-xr-x 2 4,0K 2008-10-20 01:28 Documenti
drwxr-xr-x 2 4,0K 2008-10-20 03:33 Immagini
drwxr-xr-x 2 4,0K 2008-10-20 01:28 Modelli
drwxr-xr-x 2 4,0K 2008-10-20 01:28 Musica
-rw-r--r-- 1 9,1K 2008-10-30 01:22 pes5.txt
-rw-r--r-- 1 9,2K 2008-10-30 00:45 pes5.txt~
drwxr-xr-x 6 4,0K 2008-10-24 20:16 Programmi
-rwxr-xr-x 1  281 2008-11-06 20:30 prova.sh
drwxr-xr-x 2 4,0K 2008-10-20 01:28 Pubblici
drwxr-xr-x 4 4,0K 2008-11-06 18:15 public_html
drwxr-xr-x 2 4,0K 2008-11-06 18:15 Scrivania
drwxr-xr-x 2 4,0K 2008-11-01 00:31 Video
drwxr-xr-x 6 4,0K 2008-10-27 19:19 workspace

Sometimes my eyes cross and I read permissions in a wrong way, so I came up with this command:

ls -gGh|egrep ‘[d-][wrx-]{3}[wrx-]{3}[wrx-]{3}’|sed ’s/\([d-]\)\([wrx-]\{3\}\)\([wrx-]\{3\}\)\([wrx-]\{3\}\)/|\1|\2|\3|\4|/g’

pippo@pippo-laptop:~$ ls -gGh|egrep '[d-][wrx-]{3}[wrx-]{3}[wrx-]{3}'|sed 's/\([d-]\)\([wrx-]\{3\}\)\([wrx-]\{3\}\)\([wrx-]\{3\}\)/|\1|\2|\3|\4|/g'
|-|rw-|r--|r--| 1 175M 2008-11-05 23:15 Barack.Obama.Presidential.Victory.Speech.HDTV.XviD-XOXO.avi
|-|rw-|r--|r--| 1  25K 2008-11-05 17:18 Barack.Obama.Presidential.Victory.Speech.HDTV.XviD-XOXO.srt
|d|rwx|r-x|r-x| 2 4,0K 2008-10-20 01:28 Documenti
|d|rwx|r-x|r-x| 2 4,0K 2008-10-20 03:33 Immagini
|d|rwx|r-x|r-x| 2 4,0K 2008-10-20 01:28 Modelli
|d|rwx|r-x|r-x| 2 4,0K 2008-10-20 01:28 Musica
|-|rw-|r--|r--| 1 9,1K 2008-10-30 01:22 pes5.txt
|-|rw-|r--|r--| 1 9,2K 2008-10-30 00:45 pes5.txt~
|d|rwx|r-x|r-x| 6 4,0K 2008-10-24 20:16 Programmi
|-|rwx|r-x|r-x| 1  281 2008-11-06 20:30 prova.sh
|d|rwx|r-x|r-x| 2 4,0K 2008-10-20 01:28 Pubblici
|d|rwx|r-x|r-x| 4 4,0K 2008-11-06 18:15 public_html
|d|rwx|r-x|r-x| 2 4,0K 2008-11-06 18:15 Scrivania
|d|rwx|r-x|r-x| 2 4,0K 2008-11-01 00:31 Video
|d|rwx|r-x|r-x| 6 4,0K 2008-10-27 19:19 workspace

Oh, BTW:
Image Hosted by ImageShack.us

Categories: Linux, Tutorial Tags: ,

Ubuntu: Bug using SATA hard-disk

October 21st, 2008 No comments

My hd is a Matsushita and I’m having problem because my Load_Cycle_Count is growing too fast.
Apparently Ubuntu’s having some problem dealing with it because there is some crappy configuration in the /etc/acpi/power.sh

I have no time to explain it completely but I have a temporary solution.

Image Hosted by ImageShack.us

Read more…

Change subtitles filename to match videos filename – improved

September 1st, 2008 No comments

I wrote a new python script to do the job. This time it should work properly. There is just a little flow. But I’m going to explain the workaround. )
sdf
Read more…

Categories: Python, Tutorial Tags: ,

Downgrade to Firefox 2 in Ubuntu

May 11th, 2008 No comments

If you use many firefox extensions, then you can understand the meaning of this tutorial.
Many extensions, especially the “non-institutional” ones are not upgraded to firefox 3 so they do not work.

Read more…

Categories: Linux, Tutorial, Ubuntu Tags: , , ,

Time operations using php

December 30th, 2007 No comments

It has been a long time since my last php tutorial.
PHP 4 and 5 have some functions to deal with time but if you need to know the difference between two dates you are without heavy weapon so let’s see how we can do that.
clock
The two args are timestamps. To create timestamp you can use the following php functions:

int mktime  ([ int $hour  [, int $minute  [, int $second  [, int $month  [, int $day  [, int $year  [, int $is_dst  ]]]]]]] )

mktime eturns the Unix timestamp corresponding to the arguments given. This timestamp is a long integer containing the number of seconds between the Unix Epoch (January 1 1970 00:00:00 GMT) and the time specified.
Arguments may be left out in order from right to left; any arguments thus omitted will be set to the current value according to the local date and time.

int time  ( void  )

time returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).

Read more…

Categories: PHP, Tutorial Tags: , ,

MP3 to WAV converter

November 24th, 2007 No comments

A quick howto.

mpg123 -w file.wav file.mp3

so you need mpg123. It’s available from debian official repository.