a brief about me

My avatar
Fabio Zendhi Nagao

is an applied mathematician from IME - USP - Brazil currently working as CTO at Lojcomm Internet, a company specialized in e-commerce. + info

fields of interest: E-commerce, Collective Intelligence, Interoperability, Web 2.0, Web Design, Mathematical Programming, Pattern Recognition.

contacts: Twitter and nagaozen @hotmail.com, @gmail.com and @yahoo.com

out of date goodies

In order to help the large amount of people looking for my old widgets everyday, I'm putting below a list of the most wanted. Note that the others are still accessible at http://zendold.lojcomm.com.br/.

support my projects

If you like my free products and want to support their advancement, please consider making a small (or large!) donation or buying me a book from my Amazon wishlish.

Category : Ubuntu

Nov 11th

HOWTO: Mount Windows Share in Linux

Filed Under: Ubuntu

  1. Install samba and smbfs
  2. Make folder /mnt/share
  3. Make file /etc/cifspw and fill it with username= and password=
  4. $ sudo chmod 600 /etc/cifspw
  5. Edit /etc/fstab: //ip/share /mnt/share cifs exec,credentials=/etc/cifspw 0 0
  6. $ sudo mount -a

Read More. No comments made.

May 10th

HOWTO: Restore GRUB after installing windows

Filed Under: Ubuntu, Windows

Yesterday my notebook (which came with Windows 7) simply went to a boot loop unless I change to OS to Linux o_O. Since reinstalling Windows 7 messes the whole MBR, a GRUB restore is required to get the multiboot back to work. These are the steps to get it working again:

  1. Boot with a LiveCD and in places, click the original grub partition get it mounted.
  2. Open the terminal.
  3. Verify if it's the right partition $ mount | tail -1. Something like /dev/sda5 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=devkit) will be returned.
  4. To make sure this is indeed the Ubuntu boot partition, run $ ls /media/0d104aff-ec8c-44c8-b811-92b993823444/boot
  5. To restore the grub type $ sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda --recheck
  6. Reboot and enjoy!

Read More. No comments made.

Jun 4th

Discovering the network online computers

Filed Under: Ubuntu

A while ago I faced a situation where I had to discover the online computers in our network and I ended coding the following small shell script which basically try to detect them by ping:


if [ "$#" != "3" ]; then
    echo "Invalid script call. Use './map-network.sh <base> <a> <b>' (eg 192.168.0. 100 199)"
    echo "Mapping network from $base$a to $base$b"
    for i in `seq $a $b`;
        ret=`ping -c 1 -W 1 $base$i`
        proc=`echo $ret | awk '{split($13,a,"="); print a[1]}'`
        if [ "$proc" = "ttl" ]; then
            echo "$base$i is active"

But today I realized my naivety and learned that nmap is a faster and better tool for the job! The exactly same result is achieved by executing the following code in the terminal:

$ nmap -sP 192.168.0.*

There is also a more interesting variation which, given a range, looks for the current open ports in each computer:

$ nmap -sP 192.168.0.*
$ sudo nmap -sS -p 1-1024 192.168.0.*

That's it... I hope this article helps someone else other than myself in the future :D

Read More. 1 comment.

Jun 1st

Fixing FFMPEG to enable MP3, MPEG4, AAC, and other restricted encoding libs on Ubuntu 10.04

Filed Under: Ubuntu

Just recently I ran into a lot of problems using the standard ffmpeg package from ubuntu to convert video files. Following this thread I was able fix this annoying issue. For a deep understanding about the reasons why the standard package is so restricted, just go and check the thread, but I'm covering here the basic steps to fix it in a breeze.

Read More. No comments made.

Jan 3rd

gEdit AutoComplete 0.10.0

Filed Under: ASP, GEdit, Plugins, Ubuntu

I'm very glad to announce today that I'm releasing gEdit AutoComplete plugin version 0.10.0. Now the plugin has features that I was really missing and it just cost me a little of time between Xmas and new year, so it's my first gift for the programmers in 2010. HAPPY NEW YEAR!

Important Notes

This is probably my last iteration of the gEdit AutoComplete plugin using the current architecture, 'cause the gEdit core team (pbor, jessevdk, nacho and others) are working on a native GTKSourceCompletion engine that should be the basis for the next version of this or the gEdit official one. Meanwhile, I'm inviting anyone interested to make additional language libraries to make the plugin better while the stable official version isn't available.

UPDATE: a new version has been released! Please check gedit-plugin-autocomplete in my github repository.

Read More. 11 comments.

Apr 12th

Quick Highlight Mode gedit plugin

Filed Under: Application, GEdit, Plugins, Python, Ubuntu

Quick Highlight Mode - Screenshot

This plugin provides a faster and easier way to select the current document highlighting mode in gedit. Just press Ctrl+Shift+H, type the language and press Enter.

It's written in Python, so you don't have to compile anything or get any binary. The source is there for inspection and installation.

Read More. No comments made.