Archive for the ‘cool sw’ Category.

Linux: leave process running on remote machine

Sometimes you want to ssh to a machine, leave a process running there and exit. Screen allows you to do that:

$ screen
$ sh myscript.sh
[type Ctrl+a+d to detach window]
$ exit

The process won’t stop even if you close the ssh session.

Verilog plugin for Eclipse

If you are going to develop Verilog/VHDL code using eclipse I’ve got good news for you. Veditor provides a nice environment to work with Verilog. To install it click Help->Install new software. The repository URL is at:

http://veditor.sourceforge.net/update

Be sure to uncheck Group items by category, otherwise Veditor won’t show up.

Manage VMware virtual machines from the command line

To control VMware Workstation Virtual Machines from the command line use the vmrun utility. For instance, to stop a running virtual machine use this command:

# vmrun stop myvm.vmx

For a comprehensive guide on vmrun take a look at this document.

Send mail from the command line on Mac OSX

I’ll be using my Gmail account to send mail. The first step is to configure the local Postfix server as a relay. Edit /etc/postfix/main.cf:

sudo vim /etc/postfix/main.cf

Search for a “relayhost=” line and add the following after it:

relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_sasl_local_domain = yourdomain.com
#smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes
smtpd_pw_server_security_options = noanonymous
smtp_use_tls=yes
smtp_tls_security_level=encrypt
tls_random_source=dev:/dev/urandom

Next create /etc/postfix/sasl_passwd and add the following (replace username and password accordingly):

smtp.gmail.com:587 username@gmail.com:password

Next run the following commands:

$ sudo postmap hash:/etc/postfix/sasl_passwd
$ sudo chown root:wheel /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
$ sudo chmod 600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db

You should be able to send mail from the command line now:

$ mail -s "Test" username@domain.com

You can check mail’s log file at /var/log/mail.log

To be able to send attachments from the command line (true attachments that graphical mail clients understand) install mutt:

$ curl -O ftp://ftp.mutt.org/mutt/devel/mutt-1.5.20.tar.gz
$ tar xfzvv mutt-1.5.20.tar.gz 
$ cd mutt-1.5.20/
$ ./configure
$ make
$ sudo make install

To send attachments use the following command:

echo "text body" | mutt -s "subject" -a file.dat -- username@domain.com

Or even better:

for i in {1..1000}; do echo "text body" | mutt -s "subject" -a file.dat -- username@domain.com; done

Happy mailing!

Mac OSX Preview, merge, crop, delete, add blank PDF pages

To merge and/or remove PDF pages we need the sidebar so press the sidebar button (see first figure). You can switch from thumbnails to table of contents from the button located at the bottom right corner (see second figure).

preview1 Mac OSX Preview, merge, crop, delete, add blank PDF pages

preview2 Mac OSX Preview, merge, crop, delete, add blank PDF pages

Merge PDFs.

Open the first PDF and then just drag & drop the second PDF to the sidebar, between the pages where you want it to appear (see figure).

preview3 Mac OSX Preview, merge, crop, delete, add blank PDF pages

Delete a page.

Select the page you want to delete (in the sidebar) and type Command (The key with an apple) + Backspace.

Add a blank page.

Select Edit -> Insert Blank Page.

Crop an image or file.

First click the select tool. Then select an area of your document or image and hit Command + k.
preview4 Mac OSX Preview, merge, crop, delete, add blank PDF pages

Now you can save the cropped page or image with Command + s.

preview5 Mac OSX Preview, merge, crop, delete, add blank PDF pages


Dictionary Tooltip, on-the-fly word translations while reading web pages

Dictionary Tooltip is a Firefox Addon that displays on-the-fly word translations in a small tooltip on the same page you’re reading.

Working with Dictionary Tooltip is very easy. You just have to double-click on a word and you instantly get the definition for that word (or its translation to another language).

Dictionary Tooltip comes with many dictionaries and has the ability to add new ones. You can download it here. It works with Firefox 3.5.1.

dicttooltip Dictionary Tooltip, on the fly word translations while reading web pages

Visual Studio Doxygen Latex and encoding problems

Today I tried to extract documentation from source code programmed in Visual Studio using doxygen. The Latex document didn’t compile correctly because of encoding problems. Googling for a solution I’ve discovered that Visual Studio may include some strange characters in the saved files.

To fix the files I’d recommend using an Hexadecimal Editor. In my case I’ve chosen hexedit. Opening the file with Hexedit shows those unwanted characters at the beginning of the file. By removing them and saving the file the problem with Latex disappeared. Hope it helps in case someone runs into the same issue.

hex Visual Studio Doxygen Latex and encoding problems

Google announces Google Chrome OS

Google has announced its new Operating System – Google Chrome OS. According to the Official Blog:

Google Chrome OS is an open source, lightweight operating system that will initially be targeted at netbooks. Later this year we will open-source its code, and netbooks running Google Chrome OS will be available for consumers in the second half of 2010.

Google Chrome OS will run on both x86 as well as ARM chips …

The software architecture is simple — Google Chrome running within a new windowing system on top of a Linux kernel. For application developers, the web is the platform. All web-based applications will automatically work and new applications can be written using your favorite web technologies …

We hear a lot from our users and their message is clear — computers need to get better. People want to get to their email instantly, without wasting time waiting for their computers to boot and browsers to start up. They want their computers to always run as fast as when they first bought them. They want their data to be accessible to them wherever they are and not have to worry about losing their computer or forgetting to back up files. Even more importantly, they don’t want to spend hours configuring their computers to work with every new piece of hardware, or have to worry about constant software updates…

Another step further towards the Google World Domination?

chrome Google announces Google Chrome OS

Save disk space on Mac OSX Leopard

Generally, Mac applications come with code for architectures you don’t need (e.g. PowerPC code) and with many languages you don’t use. Xslimmer removes these unneeded features, saving a great amount of disk space. In my case I’ve recovered 3GB, impressive huh?

xslimmer Save disk space on Mac OSX Leopard

Video streaming with VLC

To start the video streaming execute:

# vlc -v -I rc movie.avi --sout "#standard{access=http,mux=ogg,dst=npserver.labplan.southpark:8080)

Since we’re using the remote control interface (-I rc), we don’t need a graphical environment. This feature is specially useful if we want to stream the video without starting an X Window session.

On the client side execute the following command to receive the stream:

# vlc http://npserver.labplan.southpark:8080