Computers

Part 4: Wrapping up the foundations

Just to wrap up, and in case you are lazy like me, give you a whole file worth of subroutines. It's my toolbox and I'm giving it to you. I put this in a secure location and just call it from my other scripts. This makes the code much shorter in my other scripts, nearly auto-commenting, and avoids bugs because if it works in one, it will work in others.

NOTE: This uses the foundations in parts 1, 2 and 3. You can find them here: Part 1 Part 2 Part3

Tags:

Part 3: The SubRoutines

Now for the tools. There's a lot here, but in further articles you will see how this can be useful. I'll go through each tool with what it does, how to call it, and then the code itself.

NOTE: This uses the foundations in parts 1 and 2. You can find them here: Part 1 Part 2

Tags:

Part 2: Some Standard declarations and personalizing for your site

More foundational work. This stuff will configure for your site, and the routines that follow will regularly rely on them.

First, let's declare our modules:

#!/user/bin/perl
use strict;
use Net::LDAP;
use Authen::SASL;
use IO::Socket::SSL;
use Digest::SHA qw/sha1_base64/;
use Mail::Sendmail;
use Crypt::SmbHash;
use CGI;
use CGI qw/:standard/;

Tags:

Opening Message

Hello and Welcome!

Over the course of my time as an Admin I've done a lot of Google searches and writeen a lot of code that has been very helpful to me in my work. I will be posting things here that hopefully will help you in your quest to master some of these technologies (Or simply stand on the shoulders of midgets).

I by no means consider myself a Perl or LDAP expert. It has been a "Learn as you go" ordeal. No formal training, just get things done on an as-needed basis.

I assume that you have a basic knowledge of PERL and LDAP.

Enjoy!

-Sean

Tags:
xrayspx's picture

HOWTO: Properly SPAM A Blog

For anyone spamming blogs, especially my blog, this is the proper way to do it. This comment is vaguely related enough that it seems like maybe the person just missed the point they were trying to make, or is a bad writer. In fact, it was copied from this Amazon review of a DVD from 2007.

xrayspx's picture

Google Chrome Review @ 5 Minutes in

I've just been playing with Google Chrome from the Dev Channel site. After 5 minutes, I've got some things I hate.

xrayspx's picture

Mousepoclypse

You can tell a lot about an organization by what kind of mouse they design:

Microsoft creates the Microsoft Wheel Mouse Optical, it is curved for the hand, 3 buttons, scroll wheel, works well, is sturdy, Not Too Bad:

Fixed Tags:
xrayspx's picture

Depeche Mode - Mansfield, MA 7/31/2009

[music | Eddie Murphy & Rick James - Party all the Time]

Twenty years ago, my boss saw Depeche Mode at Great Woods, with Nitzer Ebb opening. Last night I thought that that must have been the show to see. An archived Globe article tells me I'm wrong. Nitzer Ebb would have made a much better opener than Peter, Bjorn and John, though. PB&J just pretty much annoyed us. The best part of their set was my SMS conversation about it. ("they're playing "Party all the Time", swear to god". "Hey, they're doing the Jitterbug into my brain". "PB&J (HAH) are doing Erasure covers".) before it devolved into Scandinavian bands that should have been on the stage instead. "Hey, at least the Ace of Base girl was stacked, the PB&J guy is kind of doughy, but it's just not the same".

Update: My copypasta review at Last.fm has gotten a couple of comments which made a really good point. Looking back it looks like we didn't enjoy or somehow regretted this show. Negative, it was awesome, it could have sounded better, and I'm willing to accept that it might have been our position in the venue. Let me know if you were in the middle and it sounded great to you. I still have high hopes for the CD!

More

xrayspx's picture

Backups

I've recently had to think about the mechanics of making idiot-proof backups on Linux and OSX. The specific machine I'm backing up is a Linux host with a 40GB drive. Historically only about 10% of the drive has been used, and the user has an IMAP mailbox, so all the mail is safe already.

xrayspx's picture

What it might look like if I used Twitter

Almost exactly half my music collection contains "the". Of 15,137 tracks, 7578 have "the" in the Artist, album or track name. So I'm 19 off.

The reason this came to my attention is that I was searching my collection for The The. iTunes doesn't seem to like that search much and only hits on one "the". Quotes mean nothing to this application. Thanks again Apple.

Pages

Subscribe to RSS - Computers