A simple domain name checker. This script use service from who.is
Usage:
ruby domainchecker.rb <domain_name>
(Read More) I needed a way to spawn multiple threads, have them monitored, and restarted if an error occured. I came up with the following.
This snippet is from a larger program, so if there is a problem please let me know. This is for command line and tested on Linux (well, the larger program).
(Read More) This is a simple, but complete (pseudo) random password generator.
Examples of usage:
$ ruby pgen.rb
soovmuvytv
$ ruby pgen.rb --length=20
bynnugipyeeghdbihcdn
$ ruby pgen.rb --length=20 -n
(Read More) Using an SDL (Simple DirectMedia Layer) wrapper is one way to play sound and music with Ruby. I have tested this snippet with .MID .MOD and .WAV files and it performs well. There are several SDL wrappers for Ruby available, I picked RUDL because of its simplicity. RUDL is great for writing games.
(Read More) Okay, this introduces two new things into the widget. The first thing you need is a picture file (.jpg, .png, .bmp etc...). The new code makes the picture into the button with the text "Hello, World" on the side. In the parentheses next to File.open you would put the file name with its appropriate...
(Read More) This is kind of an extension to my previous code snippet. This language is really fun to use. I find it pretty easy to use and understand. This will create a window with a button.
(Read More) This is a basic window coded in Ruby. To download Ruby go to www.ruby-lang.org and download the latest version. The latest version includes the FX toolkit that is needed to create this window.
(Read More)