From jay at jays.net Tue Sep 4 07:04:58 2007 From: jay at jays.net (Jay Hannah) Date: Tue, 4 Sep 2007 09:04:58 -0500 Subject: [Omaha.pm] Meeting tonight: Scott Hickey on Rexx References: <20070902024007.17082.qmail@server271.com> Message-ID: <336EF6B2-DF18-4025-93BB-EAF969D5ABAE@jays.net> Feel free to join me, crashing the Dynamic Language Users Group. We might have time for a quick demo of my Perl solution to the Car Wash challenge before/after the main event. j Begin forwarded message: > From: "Blaine Buxton" > Date: September 1, 2007 9:40:07 PM CDT > To: "dynamic_omaha at blainebuxton.com" > Subject: [dynamic_omaha] Sept. 4: Scott Hickey on Rexx > Reply-To: "Blaine Buxton" > > Pinch me. Our speaker this month is none other than "Mister Groovy > Eclipse Plug-In" Scott Hickey. He will be speaking about Rexx > though. Rexx is a little known scripting languages with some unique > features. This should be an incredible talk to make you think about > Rexx in a totally different light. I can not wait. > > I hope to see everyone there! > TopicRexx: The Little Known Scripting Language > SpeakerScott Hickey > TimeSeptember 4, 7-9pm > LocationUNO's Peter Kiewit Institute (PKI) building 1110 South 67th > Street Omaha, NE > > -- > Blaine Buxton > Simplicity Synthesist > http://blog.blainebuxton.com From travis at travisbsd.org Tue Sep 4 11:51:57 2007 From: travis at travisbsd.org (Travis McArthur) Date: Tue, 04 Sep 2007 13:51:57 -0500 Subject: [Omaha.pm] Greetings! Message-ID: <46DDA94D.8020607@travisbsd.org> Hello All, My name is Travis McArthur, I'm a computer science student at UNO. I've been lurking on here and the Omaha dynamic language users' group lists for awhile and thought it was about time I introduced myself. I've been working with Perl since I was about 11 when I picked it up on a whim trying to play with some CGI, went on to do a lot of small projects in it for school and various automation tasks. As I got more into the *nix world I found it more and more useful for system administration tasks etc. That's all I suppose! Glad to find fellow Perl enthusiasts :}. Best Regards, Travis From pbaker at omnihotels.com Tue Sep 4 11:55:18 2007 From: pbaker at omnihotels.com (Sean Baker) Date: Tue, 4 Sep 2007 13:55:18 -0500 Subject: [Omaha.pm] Greetings! In-Reply-To: <46DDA94D.8020607@travisbsd.org> References: <46DDA94D.8020607@travisbsd.org> Message-ID: >Hello All, >My name is Travis McArthur Greetings Travis, welcome to Omaha Perl Mongers. Sean Baker Software Architect Omni Hotels From jduche at creighton.edu Tue Sep 4 11:57:11 2007 From: jduche at creighton.edu (Virtual Joe) Date: Tue, 4 Sep 2007 13:57:11 -0500 (CDT) Subject: [Omaha.pm] Greetings! In-Reply-To: <46DDA94D.8020607@travisbsd.org> References: <46DDA94D.8020607@travisbsd.org> Message-ID: Okay rfulk- confess! How much did you pay this nice young man to be so excited about perl? =] On Tue, 4 Sep 2007, Travis McArthur wrote: > Hello All, > > My name is Travis McArthur, I'm a computer science student at UNO. I've > been lurking on here and the Omaha dynamic language users' group lists > for awhile and thought it was about time I introduced myself. > > I've been working with Perl since I was about 11 when I picked it up on > a whim trying to play with some CGI, went on to do a lot of small > projects in it for school and various automation tasks. As I got more > into the *nix world I found it more and more useful for system > administration tasks etc. > > That's all I suppose! Glad to find fellow Perl enthusiasts :}. > > Best Regards, > Travis > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joe Ducharme jduche at creighton.edu DoIT - Division of Information Technology Systems Administrator 402.280.1440 Creighton University Omaha, NE USA 68178 "Time flies like an arrow. Fruit flies like a banana." =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= From andy at petdance.com Tue Sep 4 12:43:53 2007 From: andy at petdance.com (Andy Lester) Date: Tue, 4 Sep 2007 14:43:53 -0500 Subject: [Omaha.pm] Greetings! In-Reply-To: <46DDA94D.8020607@travisbsd.org> References: <46DDA94D.8020607@travisbsd.org> Message-ID: <20070904194353.GA9397@petdance.com> On Tue, Sep 04, 2007 at 01:51:57PM -0500, Travis McArthur (travis at travisbsd.org) wrote: > Hello All, > > My name is Travis McArthur, I'm a computer science student at UNO. I've > been lurking on here and the Omaha dynamic language users' group lists > for awhile and thought it was about time I introduced myself. Where is that user group list? Thanks, xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From andy at petdance.com Tue Sep 4 12:45:00 2007 From: andy at petdance.com (Andy Lester) Date: Tue, 4 Sep 2007 14:45:00 -0500 Subject: [Omaha.pm] Perlbuzz Message-ID: <20070904194500.GB9397@petdance.com> Are we all aware of perlbuzz.com, the new news site I've started with Kirrily Robert? Lots of cool news and info you won't find in one place. xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Tue Sep 4 14:44:49 2007 From: jay at jays.net (Jay Hannah) Date: Tue, 04 Sep 2007 16:44:49 -0500 Subject: [Omaha.pm] Greetings! In-Reply-To: <20070904194353.GA9397@petdance.com> References: <46DDA94D.8020607@travisbsd.org> <20070904194353.GA9397@petdance.com> Message-ID: <46DDD1D1.1070308@jays.net> Andy Lester wrote: >> My name is Travis McArthur, I'm a computer science student at UNO. I've >> been lurking on here and the Omaha dynamic language users' group lists >> for awhile and thought it was about time I introduced myself. >> > > Where is that user group list? > Andy: From our homepage: http://omaha.pm.org/ Click the link in the "Meetings" section. Travis: The meetings are held at UNO PKI, where you undoubtedly spend gobs of time, so swing by. (*cough* tonight *cough*) I'm taking 2 classes at PKI right now, so I'm there every day too. How convenient... :) j From travis at travisbsd.org Wed Sep 5 18:28:07 2007 From: travis at travisbsd.org (Travis McArthur) Date: Wed, 05 Sep 2007 20:28:07 -0500 Subject: [Omaha.pm] Tripwire "Replacement" In Perl Message-ID: <46DF57A7.60303@travisbsd.org> Hey Guys, Not sure if there'll be any interest or not, but figured I'd throw this out there anyways. I was bored this week and needed something to do integrity checks on my servers, something Tripwire-esque but more lightweight. For those not in the know about Tripwire it's a company and piece of software that lets you basically create a series of hashes and monitor if anything on the system changes in comparison with these hashes. This is quite useful as generally when files change that are in areas critical to the system (/bin, /sbin, etc) it means the system binaries have been replaced by rootkit binaries. This system has, at least in my experience, been a pain to setup and configure. So I decided to replace it. With a little Perl-fu and some help from a useful utility called mtree comes CamelTrap. Feedback is welcome, so if you're interested in giving some or just trying it out you can grab it from http://travis.travisbsd.org/pfiles/CamelTrap.tar It requires mtree, Term::ReadKey, and of course Perl. There's a brief README explaining usage, I'll shutup and let it explain the rest so I don't flood your inboxes anymore than I already have! Best Regards, Travis From jhannah at omnihotels.com Mon Sep 10 10:43:21 2007 From: jhannah at omnihotels.com (Jay Hannah) Date: Mon, 10 Sep 2007 12:43:21 -0500 Subject: [Omaha.pm] Grab all the Error and Warnings out of XML, s/^\n//mg Message-ID: Wrote this this morning as a quick proof of some XML tag capture I needed. I like the s/^\n//mg trick, which gets rid of the annoying blank lines in $in_message scalar. j my $in_message = < -snip!- EOT my $out_message = < EOT my @bad_stuff; foreach ($in_message, $out_message) { my $twig = new XML::Twig; $twig->parse($_); my $root = $twig->root; push @bad_stuff, map { $_->sprint } $root->get_xpath('//Error'); push @bad_stuff, map { $_->sprint } $root->get_xpath('//Warning'); } print join "\n", @bad_stuff; print "\n"; $in_message =~ s/^\n//mg; print "$in_message\n"; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20070910/16d228eb/attachment.html From jay at jays.net Tue Sep 11 13:04:10 2007 From: jay at jays.net (Jay Hannah) Date: Tue, 11 Sep 2007 15:04:10 -0500 Subject: [Omaha.pm] pos() - WHERE did my regex match? Message-ID: <46E6F4BA.5090607@jays.net> pos() is neat. Rarely do I care WHERE a regex hit a string, but in the example below I do care, very deeply, WHERE the hits were. Enter pos(). The part of my code that uses pos(): while ($seqstr =~ /$primer_seq/g) { printf(" Found '%s'. Next attempt at character %s\n", $&, pos($seqstr)+1); Yoinked from this website: http://www.regular-expressions.info/perl.html Finding All Matches In a String That website is actually more helpful than (perldoc -f pos) I end up Googling for this about once a year. :) Cheers, j primer_finder.pl #!/usr/bin/perl use Bio::SeqIO; # A hash of all our known primers... my %primers; $primers{"18S_F"} = uc("attggagggcaagtctggtg"); $primers{"18S_R"} = uc("ctatgccgactagggatcgg"); $primers{"M1"} = "GGAAGTAAAAGTCGTAACAAGGTT"; $primers{"I1"} = "CCGTAGGTGAACCTGCG"; $primers{"I4"} = "GCATATCAATAAGCGGAGGA"; $primers{"H2R8"} = "CCTCGGATCAGGTAGGGATAC"; $primers{"I2"} = "GCATCGATGAAGAACGCAGC"; $primers{"I3"} = "CGAGTCTTTGAACGCACATTG"; my $io = Bio::SeqIO->new( #-file => '/home/dbastola/genbakDownload/161_88107/gbbct24.seq', -file => 'fake_data.gbk', -format => 'genbank' ); while (my $seq = $io->next_seq) { # $seq is now a Bio::Seq object my $acc = $seq->accession; my $seqstr = uc($seq->seq); print "Searching $acc...\n"; foreach my $primer_name (keys %primers) { my $primer_seq = $primers{$primer_name}; print " looking for $primer_name ($primer_seq)...\n"; while ($seqstr =~ /$primer_seq/g) { printf(" Found '%s'. Next attempt at character %s\n", $&, pos($seqstr)+1); my $start = pos($seqstr) - length( $primer_seq ) + 1; my $stop = pos($seqstr); print " Hey, I found $primer_name at [$start..$stop]\n"; } } } From jay at jays.net Wed Sep 12 13:44:20 2007 From: jay at jays.net (Jay Hannah) Date: Wed, 12 Sep 2007 16:44:20 -0400 (EDT) Subject: [Omaha.pm] Grab all of a specific node out of huge XML files Message-ID: Wow. Perl rocks. j Problem: Given a bunch of humongous XML files called pay*, grab all the tags. Solution: $ perl -lne '/()/ && print $1' pay* | head (You might need to add /m for multi-line matching in case your files wrap.) From jay at jays.net Thu Sep 13 09:25:49 2007 From: jay at jays.net (Jay Hannah) Date: Thu, 13 Sep 2007 11:25:49 -0500 Subject: [Omaha.pm] uuencode - C, Pascal, or Perl? Message-ID: <0818E31D-6D51-4348-9840-85C67E026E8F@jays.net> -laugh- The GNU sharutils bundle has uuencode in it. uuencode is a handy tool for emailing binary files to someone from the command line. It used to be standard on *nix, but not so much any more. Anyway, I think it's funny that the bundle lets you choose between 3 implementations: 313 lines of C 202 lines of Pascal 10 (actually 5) lines of Perl :) j $ pwd /home/jhannah/src/sharutils-4.6.3 wc -l 313 src/uuencode.c 10 contrib/uuencode.pl 202 contrib/uuencode.pas $ cat contrib/uuencode.pl # uuencode in Perl - non tested. # Copyright (C) 1995 Free Software Foundation, Inc. # Fran?ois Pinard , 1995. print "begin 644 $ARGV[0]\n"; print pack ("u", $bloc) while read (STDIN, $bloc, 45); print "`\n"; print "end\n"; exit 0; From TELarson at west.com Thu Sep 13 12:53:21 2007 From: TELarson at west.com (Larson, Timothy E.) Date: Thu, 13 Sep 2007 14:53:21 -0500 Subject: [Omaha.pm] uuencode - C, Pascal, or Perl? In-Reply-To: <0818E31D-6D51-4348-9840-85C67E026E8F@jays.net> References: <0818E31D-6D51-4348-9840-85C67E026E8F@jays.net> Message-ID: Jay Hannah wrote: > -laugh- > > The GNU sharutils bundle has uuencode in it. uuencode is a handy tool > for emailing binary files to someone from the command line. It used to > be standard on *nix, but not so much any more. > > Anyway, I think it's funny that the bundle lets you choose between 3 > implementations: > > 313 lines of C > 202 lines of Pascal > 10 (actually 5) lines of Perl Heh heh. The C/Pascal versions must be implementing the uuencoding themselves, whereas Perl already has it built in. Very handy. I remember the days of uuencode, but can't say I've ever needed to do it myself. If I wanted to transfer a binary, I used ftp. Tim -- Tim Larson InterCall, a subsidiary of West Corporation Eschew obfuscation! From jay at jays.net Thu Sep 13 13:05:22 2007 From: jay at jays.net (Jay Hannah) Date: Thu, 13 Sep 2007 15:05:22 -0500 Subject: [Omaha.pm] uuencode - C, Pascal, or Perl? In-Reply-To: References: <0818E31D-6D51-4348-9840-85C67E026E8F@jays.net> Message-ID: <46E99802.1000304@jays.net> Larson, Timothy E. wrote: > Heh heh. The C/Pascal versions must be implementing the uuencoding > themselves, whereas Perl already has it built in. Very handy. > Suckers. :) Pay no attention to the pack() behind the curtain! (Here there be dragons. Deep black magic.) > I remember the days of uuencode, but can't say I've ever needed to do it > myself. If I wanted to transfer a binary, I used ftp. > I'm not an X-Windows guy so when I'm sitting at my Mac or Win* client ssh'd into *nix and a /\.(pdf|doc|png|vsd)/ file is sitting there I usually just email it to myself then double click it on my local client. uuencode ferret.png ferret.png | mail whatever at wherever.whatever j From jay at jays.net Mon Sep 17 17:20:46 2007 From: jay at jays.net (Jay Hannah) Date: Mon, 17 Sep 2007 19:20:46 -0500 Subject: [Omaha.pm] debugger Message-ID: <8CC82A53-4E0D-4E4E-800C-1F62BA650378@jays.net> I use this all the time: x $self But did you know you can do x 2 $self which limits the depth of x to 2 levels deep? Stick any number in there to only get that level of depth printed. Neato. :) j From rob.townley at gmail.com Thu Sep 20 07:09:11 2007 From: rob.townley at gmail.com (Rob Townley) Date: Thu, 20 Sep 2007 09:09:11 -0500 Subject: [Omaha.pm] Backslash at EppleyAirfield.com breaks airlines in Firefox Message-ID: <7e84ed60709200709g5d39785dvcd3e4803b6645620@mail.gmail.com> I like the fact that Firefox sticks to the standards weeding out loopholes to make more solid code. If you have ever used EppleyAirfield.com's Airline Flight Information in Firefox (even on Windows), you have been aggravated by the following problem for a few years. Yes, i complained 2 or 3 years ago, but clearly nothing has been done to change just a single character. HirschDesign.com put in a backslash "%5C" instead of a forward slash "%2F" for the logo images. These images are required to find the airline in question. What is more insulting is that there is no alternative text in place of a picture. There is no ALT="AirlineName" html in case images are turned off - such as on a slow cell phone. Right click on the image place holders at http://www.eppleyairfield.com/fids/fids_a.html and choose "Copy Image Location". Paste that into your favorite text editor and you will see the offending culprit %5C backslash '\' immediately before the name of the file. Change the '%5C' into a forward slash or 'Solidus' and paste that into the address bar of Firefox. Malformed HTML: http://www.eppleyairfield.com/fids/images%5Cinline_southwest.gif Well formed HTML: http://www.eppleyairfield.com/fids/images/inline_southwest.gif Please urge the following changes: 1.) Fix the images to web standards by changing the backslash to a forward slash. From the Internet Engineering Task Force RFC http://www.ietf.org/rfc/rfc3986, "A path consists of a sequence of path segments separated by a slash ("/") character." 2.) Add alternate text to the images to make them compatible with screen readers. Required for all government websites for years. "HTML Techniques for Web Content Accessibility Guidelines 1.0" at http://www.w3.org/TR/WCAG10-TECHS/#tech-text-equivalent OMAHA AIRPORT AUTHORITY, 4501 Abbott Drive, Suite 2300/ EPPLEY AIRFIELD, OMAHA, NE 68110-2689 Business Office - (402) 661-8000 Airport Information - (402) 661-8017 Fax - (402) 661-8025 http://hirschdesign.com/ 14801 Pratt Court Omaha, NE 68116 402-455-0383 jenhirsch at hirschdesign.com p.s. Our family depends upon airline flight arrival / departure information because get togethers can involve scores of people arriving at the airport. I don't want to have to boot into Windows just to check on flight status. Please urge them to fix the website. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20070920/9ba96d02/attachment.html From jay at jays.net Mon Sep 24 07:33:44 2007 From: jay at jays.net (Jay Hannah) Date: Mon, 24 Sep 2007 09:33:44 -0500 Subject: [Omaha.pm] Tripwire "Replacement" In Perl In-Reply-To: <46DF57A7.60303@travisbsd.org> References: <46DF57A7.60303@travisbsd.org> Message-ID: <658EFAE5-0860-4DF0-8A64-55B67120CB19@jays.net> On Sep 5, 2007, at 8:28 PM, Travis McArthur wrote: > With a little Perl-fu and some help from a useful utility called mtree > comes CamelTrap. Feedback is welcome, so if you're interested in > giving > some or just trying it out you can grab it from > http://travis.travisbsd.org/pfiles/CamelTrap.tar Sounds like a neat idea. I'm not an admin, so I'll happily leave its use to admin types. :) Are you going to publish to CPAN? Or even list it on your own homepage? http://travis.travisbsd.org/index.cgi?mode=code :) j http://clab.ist.unomaha.edu/CLAB/index.php/User:Jhannah From jay at jays.net Mon Sep 24 07:37:34 2007 From: jay at jays.net (Jay Hannah) Date: Mon, 24 Sep 2007 09:37:34 -0500 Subject: [Omaha.pm] Fwd: Newsletter from O'Reilly UG Program, September 21 References: Message-ID: <729F85D1-251F-4CEE-B755-880747DB1FAA@jays.net> Here's the newsletter if you're interested: http://www.oreillynet.com/oreilly/ug/newsletters.csp Perl content: http://perlsurvey.org/ Perl Survey 2007 Closes September 30th The Perl Survey is attempting to take a snapshot of the Perl world as it currently stands. Whether you're a web developer, sysadmin, or using Perl for scientific research or finance or just tracking your DVD collection, they want to hear about it. j Begin forwarded message: > From: "Marsee Henon" > Date: September 21, 2007 3:55:53 PM CDT > To: jay at jays.net > Subject: Newsletter from O'Reilly UG Program, September 21 From travis at travisbsd.org Mon Sep 24 10:14:30 2007 From: travis at travisbsd.org (Travis McArthur) Date: Mon, 24 Sep 2007 12:14:30 -0500 Subject: [Omaha.pm] Tripwire "Replacement" In Perl In-Reply-To: <658EFAE5-0860-4DF0-8A64-55B67120CB19@jays.net> References: <46DF57A7.60303@travisbsd.org> <658EFAE5-0860-4DF0-8A64-55B67120CB19@jays.net> Message-ID: <46F7F076.6010804@travisbsd.org> Jay Hannah wrote: > On Sep 5, 2007, at 8:28 PM, Travis McArthur wrote: > >> With a little Perl-fu and some help from a useful utility called mtree >> comes CamelTrap. Feedback is welcome, so if you're interested in >> giving >> some or just trying it out you can grab it from >> http://travis.travisbsd.org/pfiles/CamelTrap.tar >> > > Sounds like a neat idea. I'm not an admin, so I'll happily leave its > use to admin types. :) > > Are you going to publish to CPAN? > > Or even list it on your own homepage? > http://travis.travisbsd.org/index.cgi?mode=code > > :) > > j > http://clab.ist.unomaha.edu/CLAB/index.php/User:Jhannah > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > > Probably so, once I get it finished, I figured I'd give it to a few mailing lists on I'm on prior to releasing it so they could point out any problems they saw =P. But yea, what I actually want to do eventually is put it into a module so that other programs/perl scripts can call the functionality in it which I think would be a big convenience for sysadmins writing quick perl scripts to do various things. So yea, once I get some time to finish it up I'll probably see what I can do to get it out in the world :} Best Regards, Travis From travis at travisbsd.org Tue Sep 25 22:53:07 2007 From: travis at travisbsd.org (Travis McArthur) Date: Wed, 26 Sep 2007 00:53:07 -0500 Subject: [Omaha.pm] Check For Primes Using Perl & Regex Message-ID: <46F9F3C3.7090200@travisbsd.org> http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/ I found this page while randomly surfing the net this evening, I found it quite amusing and figured some people here might too. Using regular expressions to check for the primality of a number seemed very novel to me, and it's in Perl as well (though they give one example in Ruby too). Very cool stuff (and a testament to the power of Perl's regular expressions engine). Best Regards, Travis From jay at jays.net Fri Sep 28 16:03:11 2007 From: jay at jays.net (Jay Hannah) Date: Fri, 28 Sep 2007 18:03:11 -0500 Subject: [Omaha.pm] Fwd: [dynamic_omaha] October 2, 2007 - Sam Tesla - Gentle Introduction To Erlang References: <20070928024808.5700.qmail@server271.com> Message-ID: <17D48F16-54C2-441C-9C04-CBF09E0E8339@jays.net> Howdy Perl Mongers -- Here's the next meeting I'll be crashing. Join me. :) http://www.blainebuxton.com/odynug/ j Begin forwarded message: > From: "Blaine Buxton" > Date: September 27, 2007 9:48:08 PM CDT > To: "dynamic_omaha at blainebuxton.com" > Subject: [dynamic_omaha] October 2, 2007 - Sam Tesla - Gentle > Introduction To Erlang > Reply-To: "Blaine Buxton" > > Erlang is the hottest new language in the land to learn. It's what > on the tip of everyone's tongue. Why is it so hot? What makes it so > special? I am proud to have Erlang guru Sam Tesla presenting to > educate us all. He will be displaying why Erlang scales so well and > it's many unique features. This will be one meeting that should not > be missed! > > And if that wasn't enough, we have none other than Tek Systems > providing all of the pop and pizza that our bellies can take. > Prepare to have your mind and stomach stuffed! > > Come out and join us for the best user group in the land (In my > opinion, of course). > > > > > > > TopicA Gentle Introduction to Erlang > Speaker Sam Tesla > Time October 2, 7-9pm > Location UNO's Peter Kiewit Institute (PKI) building > 1110 South 67th Street > Omaha, NE > > -- > Blaine Buxton > Simplicity Synthesist > http://blog.blainebuxton.com