This section is now closed for posting code. Please use Cool Uses For Perl instead.

Code Categories
Audio Related ProgramsFTP stuffNT Admin
CGI ProgrammingFun StuffWin32 Stuff
Chatterbox ClientsGUI ProgrammingMiscellaneous
CryptographyHTML UtilityText Processing
Database ProgrammingUtility ScriptsNetworking Code
E-Mail ProgramsWeb StuffPerlMonks Related Scripts


New Code
Tk Interface To Run Apps
on Sep 19, 2008 at 17:48
1 reply by ~~David~~
I have to run a ton of things from the Windows scheduler. This app lets you run a bunch of scripts from the command line when supplied with 1 as the script argument. If run without any argument (such as double-clicked), it opens up the TK interface to add programs...
Update: added threading and better logging date / time stamp
cvs wrapper with ssh-agent
on Sep 19, 2008 at 11:02
1 reply by jacques
I wrote this cvs wrapper because we were using cvs over ssh and I didn't want to keep logging in each time I invoked cvs. If you are doing the same thing, you might find it useful. One thing to note is that if someone has root, it is possible for them to get your password, since ssh-agent keeps it unencrypted in memory.
Random-fill media device
on Sep 18, 2008 at 22:22
1 reply by colakong
A script to fill a flash device with randomly-selected music from your collection. I created this to fill my Samsung S3 (using the Korean UMS firmware), as Rhythmbox doesn't have an auto-fill feature.
Crosshairs on Gtk2 Gnome2::Canvas
on Sep 17, 2008 at 16:05
0 replies by zentara
Crosshairs are a professional looking addition to graphic programs.

I recently tried the Gtk2-Ex-Xor module's crosshair on the Gtk2 canvas type items, (Gnome2::Canvas and Goo::Canvas), and thanks to Kevin Ryde (module author), it now works on them. There was some difficulty because crosshairs typically are written on the low-level gdk window, but the canvases, had their own special windows. Anyways, this shows how to add crosshairs to canvas widgets.

SmiffyCalc (SC)
on Sep 16, 2008 at 19:11
1 reply by smiffy
SmiffyCalc was the result of my not being able to get on with any of the regular command-line calculators that are available. Essentially, it just feeds the user input to eval() and returns the result. To this, I have added variables, the ability to preserve state between sessions (via a tied hash) and some little features that tickle my rather challenged sense of humour.
sql-o-matic
on Sep 15, 2008 at 22:31
1 reply by smiffy

This is about the fourth generation of this programme that I have been using over the last few years to generate SQL and Perl code based on a MySQL database schema. The idea behind this is much repetitive coding can be eliminated - the ouput of this programme can be tweaked/corrected and then cut and pasted into an application.

Simple bi-directional forking commandline client
on Sep 05, 2008 at 15:39
1 reply by zentara
About as simple a forking bi-directional client as you can get. Use with Glib based forking server with root messaging
Glib based forking server with root messaging
on Sep 05, 2008 at 15:26
1 reply by zentara
This is a forking server to handle multiple connections, as well as 1 way root messaging to all connected clients. If you need a bi-directional client for testing, try Gtk2 Interactive Chat client or get the super simple commandline forking client at Simple bi-directional forking commandline client

The code will allow root messages to be sent to all clients (or you can disable this feature by comment changes.) It should also show the way for multi-echoing all text to all clients, if desired.

This server is Glib based, an event-loop system, so you can put many other things in the mainloop simply by adding a timer to launch them. This saves the hassle od complex nested while loops.

UPDATED Sept 6,2008, added commented code to use Glib::IO instead of Gtk2::Helper; both are available, but Gtk2::Helper is simpler to use.

Red_V0.1.cgi
on Aug 30, 2008 at 05:23
2 replies by TheRealNeO
This script should be used on a webserver tested on apache,It has been designed to be multi purpose as at can be used for logging form data or with some small modification people who enter your page. Also it looks better in kwrite than on this page
Trash temporary files
on Aug 21, 2008 at 20:27
0 replies by bruno
BACKGROUND
I am a little obsessive with the tidiness of my home folder. I cannot stand seeing loose, uncategorized files scattered everywhere (let alone in the Desktop -- the horror!). But more often than not, i run across files that do not really fit into any particular category, and I also do not know if I'll want to store them permanently or not.
So I have a ~/tmp folder in which I toss "the garbage" there, and every month or so I take a look at it and see what gets deleted and what gets "saved" and categorized.

THE SOLUTION
So I wrote this little script (I think of it as one of those robot-housewives from The Jetsons) that looks into my ~/tmp folder every hour and sends those files that are N days or older (measured as days upon arrival to the ~/tmp folder) to the trash. This gives you a certain time window in which you can re-evaluate the usefulness of that file and rescue it from oblivion or not.