Archive for the ‘Ruby’ Category

Net::DHCP

Monday, November 5th, 2007

The aim of Net::DHCP (hosted at RubyForge) is to provide a set of classes to low level handle the specifics of DHCP (rfc2131, rfc2132, etc.) in ruby.

With Net::DHCP you will be able to craft custom DHCP packages and have access to all the fields defined for the protocol.
(more…)

Popularity: 18% [?]

rComic: comic strip downloader

Tuesday, October 23rd, 2007

rComic is a small script to download and display Internet comic strips. To add new strips, you only need to modify the config file. And it is an interesting exercise to play with the Net::HTTP and YAML libraries.
(more…)

Popularity: 22% [?]

using the fox toolkit in ruby

Tuesday, October 2nd, 2007

The fox toolkit is a portable C++ graphical library. If you download old code (such as the nice rubyforger – that sits on top of libnet and libpcap) you may end up with some headache, so these easy steps will help to get your fox application up and running :)
(more…)

Popularity: 18% [?]

rails environment with lighttpd

Tuesday, September 4th, 2007

We want an automated deployment enviroment. The server will automatically (upon restart) detect all the rails applications under a given folder and create virtual hosts for them. No further changes in the server configuration will be required. never. :)
(more…)

Popularity: 16% [?]

ruby Qt: model / view / controller

Wednesday, August 15th, 2007

From the wikipedia:

Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (view) concerns, so that changes to the user interface will not affect data handling, and that the data can be reorganized without changing the user interface.

MVC is not only useful for web frameworks and applications, here is a simple example of the implementation of the MVC pattern for a Qt GUI application.
(more…)

Popularity: 23% [?]

ruby bot: email processing

Tuesday, August 7th, 2007

Pinky: Gee, Brain, what are we going to do tonight?
Brain: The same thing we do every night, try to take over the world!

Have you ever wanted to have the ability to send commands to your box using email? Use RubyBot, the brand new plugin-driven ruby script that makes the task of taking over the world a bit easier!
(more…)

Popularity: 21% [?]

ruby Qt: menu bar, status bar and resources

Tuesday, July 31st, 2007

Menu and status bar are two elements that you expect to find in most applications out there. Menu bars are rich elements that consists of menu items and actions. Each action consists of a text and optionally a shortcut and an icon.
(more…)

Popularity: 22% [?]

ruby Qt custom widget example

Monday, June 4th, 2007

With Qt’s custom widgets you can create the building blocks of the GUI of your application.

In this case we are creating a graphical command line. The command line will consist mainly of a text input box (Qt::LineEdit). The widget will have memory, that is, every line entered by the user will be added to the internal history of the widget and will be accessible by means of Up and Down arrows as the standard *nix command line.

(more…)

Popularity: 21% [?]

ruby Qt::TreeWidget example

Saturday, June 2nd, 2007

I am involved in some projects were we are using Qt library for GUI development with ruby. In the following example I will show how to use the Qt::TreeWidget object.

The TreeWidget can be used not only to display information hierarchically but also to add multiple columns to the data model.
(more…)

Popularity: 20% [?]

runningserver: hello? anybody out there?

Wednesday, December 20th, 2006

I have created a small ruby script to check if there are running servers on a given port number. The script is able to check a list of hosts and will output an informational message on the port status for each host.

Let’s begin with the script. Then we can talk about the work it does.
(more…)

Popularity: 17% [?]