Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Code Catacombs

( [id://1747]=superdoc: print w/replies, xml ) Need Help??

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
RedHat Linux ssh deny
on Feb 18, 2009 at 08:57
0 replies by redleg7
This code makes use of the /etc/hosts.deny file to block brute force attacks using ssh (however it can easily be modified for other tcp wrapped services such as FTP). The code writes a line to the /etc/hosts.deny file when the number of failed logins exceeds a stated criteria (in this case 9) within a set time (in this case 1 minute). This is accomplished by first getting the last 100 lines of the /var/log/secure file and looking for failed logins.
xlsmerge - Merge worksheets from different Excel files into one Workbook
on Feb 13, 2009 at 04:58
3 replies by Corion

This script is a raw utility that I use to merge "information" and "data" sheets from different Excel workbooks. The basic syntax is as follows:

xlsmerge -s -o results-%Y%m%d.xls info.xls:Information query_results.x +ls:Sheet1

The above command line will create results-20091302.xls containing a worksheet "Information" and one worksheet "Sheet1" from the respective Excel files. There is no renaming functionality and duplicate sheet names are fatal.

Gtk2 2d Table Demo
on Feb 02, 2009 at 13:30
0 replies by zentara
A simple demo, to show how to display data in a nicely colored Table in Gtk2. Mouse actions on elements is demonstrated. A Table in Gtk2 more closely resembles an html table, unlike plain Tk Tables, which are more like cell grids.
Gtk2 Simple Image Fade
on Jan 19, 2009 at 12:43
1 reply by zentara
A very simple demo of fading between images. The one thing to note, is that composite on a pixbuf will be cumulative, so notice I reset the base pixbuf to it's original on every timer call. There may be better ways around the problem.

Also I chose an alpha increment and timer speed to be effective, yet not too cpu intensive.

Additionally note that I read in the images to be the same scale. In a more complex "slideshow", you will have to deal with the effects of compositing files of different sizes.

Tk Canvas Interactive bar graph
on Jan 12, 2009 at 15:29
0 replies by zentara
A simple way to have mouse-interactive bar graphs. Just the basic stuff: generating contrasting bg fg colors, vertical text labels, and saving to postscript. Add whatever features you want.
Gtk2 Entry with validation and Pango coloration
on Jan 04, 2009 at 12:32
0 replies by zentara
Emmanual Rodriguez has come out with a helper module to do validation on an Gtk2::Entry widget. See Gtk2-Ex-Entry-Pango

This is a slightly modified version of one of the module's examples, that can be used to get data from a user. It also has a clever non-editable prompt, in the expose event.

Fix CPAN uploads for world writable files
on Dec 21, 2008 at 17:33
1 reply by bart
CPAN refuses to index tarballs with world writable files, a problem most commonly encountered by people creating CPAN distributions in Windows.

This script will fix the file modes of the files directly in the tarball. Run it right after you created the tarball, but before you upload to PAUSE.

Run with -h or --help to see allowable command line options. You need at least:

  • A filename
  • The -i option to replace the file or the -o option to save it as a new file
Blowfish based password hashing
on Dec 21, 2008 at 15:59
0 replies by zentara
Many linux/unix distibutions are moving up to a variation of blowfish to hash passwords. See blowfish password hashing for more details.

The Crypt-Eksblowfish module gives Perl users the access to this, but the module has many parts and is not crystal clear on usage. This is just a clarified version of one of the modules test scripts, to show how you can use it.

schedule.pl
on Nov 30, 2008 at 15:21
0 replies by Minimiscience
This is a basic program for converting a specification of a weekly schedule (e.g., a class schedule) into a neat PostScript chart. Documenation is given as POD at the end of the file.
Gtk2 Bubble notification windows
on Nov 29, 2008 at 14:12
0 replies by zentara
This package allows you to pop "cartoon-like bubble windows" centered on another window, or a StatusIcon, to send a notification message. It's based on the great work of Dirk van der Walt and his Gtk2 Study Guide

You can specify a window to pop on, or an x,y location.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found