2011/12/20


Code to print the leaf nodes in a tree, enjoy.



#!/usr/bin/perl
################################################################################
use strict;
use warnings;
################################################################################
use Path::Class; #file(), dir()
use Cwd; #getcwd()
################################################################################
# prototypes
################################################################################
sub report_leaf_dirs();
my $start_dir = dir( $ARGV[0] || getcwd() );
#print "DEBUG: Scanning $start_dir\n";
$start_dir->recurse( callback => \&report_leaf_dirs );
##################
# 
##################
sub report_leaf_dirs() {
  my $object = shift;
  # print "DEBUG: processing $object\n";
  return unless $object->is_dir();
  # Test to see if we can read it
  unless( $object->open() ) {
    warn "Unable to open $object\n";
    return;
  }
  # Test for sub directories
  foreach my $child ( $object->children() ) {
    return if $child->is_dir();
  }
  print "$object\n";
}

2010/12/07

Simple dimple twee (though verbose and pedantic) wrapper to cvs2svn to process a set of paths generated by running this:
find ./cvsmaster/modulepredicate* -maxdepth 1 -mindepth 1 -type d >> cvs2svnworkitems.txt


#!/usr/bin/perl
use warnings;
use strict;
sub svnop($);
my $inputfile = "cvs2svnworkitems.txt";
open (my $ifh , '<', "$inputfile") && print "opened $inputfile"; while (<$ifh>){
chomp $_;
print "processing work item line:".$_."\n";
svnop($_);
}
close $ifh && print "close $inputfile";

sub svnop($) {
my $inputtarget = shift;
print "running svnop($inputtarget)\n";

my $svntargetdir = "svnmigrate/";
my $cvsmodulename = $_;
print "pre substitution: \$cvsmodulename=[$cvsmodulename]\n" ;
$cvsmodulename =~ s/cvsmaster\///;
print "post substitution \$cvsmodulename=[$cvsmodulename]\n" ;
print "operating on cvs module $cvsmodulename\n";
my $svncommand = "cvs2svn --verbose --svnrepos=$svntargetdir.$cvsmodulename $_";
print "running $svncommand=[$svncommand]\n";
my $rc = `$svncommand`;
print "run complete, \$rc = $rc\n";
}


__END__
cvs2svnworkitems.txt

2010/12/03

This is a post from my phone using sms

RPMForge

Red Hat support being four pips less useless than IBM support, I'm forced to admit defeat and merely install SVN using their repository rather than actually activating a test system on RHN. It's all so disappointing to deal with two really obviously technically advanced companies that SUCK at dealing with technical issues on their front lines. With the exception of 1/3 of the IBM personnel I dealt with on the phone this week, most of my experience has been disheartening at best.

Mike Costello Classic Resume

Michael S. Costello

6502 Columbia Oaks Ct #B • Austin, TX 78759

fraterm@gmail.com
512.576.2985

Objective

Seeking a leadership position in a technical field working with Unix-like operating systems in a senior technical, management or development role.


Experience

Pervasive Software, Austin, TX

March 2006 - Present

Configuration Management Engineer

  • Edit and write build automation tooling and software development configuration files.
  • Provision, administer and maintain a small fleet of Unix, Linux, Mac OS, and Windows build machines.
  • Co-Administer source code configuration management (Rational Synergy/CM Synergy/Change, Subversion, CVS) as well as bug-tracking, code auditing and other application lifecycle management software.  Upgrade source control systems seamlessly (so that users do not have to generate new passwords, or even need to know the backend system has been migrated).
  • Create and submit as needed BuildForge jobs, install client agents on build servers, provision compilers and other required software to build software on all platforms supported by team.
  • Configure and install Hudson servers and slave systems for Hudson continuous integration system.
  • Install and configure Atlassian Jira and Confluence application lifecycle management tools.
  • Archive old builds, automate the process of generating labels for said archives.
  • Handle end user service requests relating to new build machine linking and compiler behavior, general requests for  resets and access control modification, as well as providing log data on build failures as they occur.
  • Recommend and implement technologies to various members of the company.  Present capabilities of software to technical team members and management.

IBM, (Contract through CTG) Austin, TX

September 2003 - March 2006

Build Engineer

  • Handled Software Configuration Management duties (CMVC and Rational Clearcase as well as CVS, Subversion) for the websphere product, and several supporting development streams.
  • Wrote a major file system synchronization tool that synchronized local network stored (Physical DASD over SSH Transport/NFS/Samba) builds to and from remote distributed file system stores (DFS and GSA filesystems) in a manner according to specifications.  Tool was written targeting Perl 5.6.
  • Minor administration and day to day modification of PostgreSQL Database supporting a custom precursor to tools like BuildForge.
  • Extensive administration of Windows, AIX, HP-UX, Solaris and Linux build machines.

Dell Computer Corporation, Round Rock, TX

September 2002 - September 2003

Enterprise Server Test Technician

  • Test Enterprise Dell Servers according to Engineering Directives
  • Troubleshoot and report hardware and systems management software issues to development.
  • Physically reconfigure Dell server and client hardware, drive enclosures, rack mount systems and  various high and low end network equipment according to test needs.
  • Spherion Contract to permanent position.


Experience

IBM(Contract through Ciber and later EMLI), Austin, TX

January 1999 - September 2002

Y2K rollout Tech, Software Test Engineer

  • Performed Y2K rollout for IBM IT in Austin.  Worked with a large team of techs, became a technical leader on the team with OS/2 and other particular business needs of the rollout.  Verified and repaired errors of other technicians while keeping up my work queue.  Recieved several minor commendtions from y2k upgrade / rollout recipients/customers.
  • Later contract was extended and my Job role was moved to a Software Test Engineer position.  Worked on a thin client product HW/Firmware/SW test team.  Dealt with ISV's mastered AS/400 administration appropriate to the role of hosting thin client workstations.  Provided valuable Linux experience to the team.  Wrote test tools in Java, Perl, and Shell scripting.
  • Dealt with ISV and sales personnel to demonstrate current product capabilities.  Described product error and performance data for external Vendor/Suppliers of custom code in a manner to facilitate remedies in Operating System code, low level and application level problems were encountered.

NSP, (Contract through Tek Systems) Minneapolis, MN

September 2005 - March 2006

Mainframe Operator

  • Rotating biweekly shift position at the data analysis and bill printing processing center of Northern States Power.
  • Managed print jobs consisting of primarily: 24/7 bill printing for Minnesota, Wisconsin, Northern Iowa and portions of North and South Dakota.  Ensuring bill print quality was up to requirements was a primary concern, and thus, operation of an advanced IBM large scale bill printing machine was similarly essential.  Managed untold reams of power consumption, distribution and other technical reports submitted by teams at the facility.  
  • Supplied tape autoloaders with coded backup and restore tapes, managed tape placement and resupply according to generated pick lists.  Was required to remain in facility and not leave premises overnight during night-time hours.  Informed superiors of problems implementing certain JCL instantiated workflows(essentially reporting bugs).
  • Occasionally had the joy of interacting with a few Sun machines at the other end of the lab and wondered why they weren't doing what these mainframes were doing.
  • Supplied microfiche printer and several other small scale specialty print machines with the care and feeding necessary for their continued operation.  Occasionally got to print paychecks for all members of the facility.

Fortis (Contract through Adecco Staffing), Minneapolis, MN

September 2004 - August 2005

System Rollout Technician

  • Provision and deploy new desktop systems for employees of a major international financial services firm.
  • Troubleshoot network issues with token-ring and ethernet networks.
  • Handle user computer system moves in cubicles and offices.

Z-Net, Internet Service Provider(Internship), Minneapolis, MN

September 2004 - August 2005

Software Developer, Support Engineer

  • Handle user needs maintaining connectivity to the internet in the days of dialup at a small ISP in Minneapolis.
  • Develop CGI Scripts for various clients web presence, most work was done in Visual Basic and Delphi.
  • Develop multimedia software and custom industrial process software in Visual Basic.

Education

Brown Institute, Minneapolis, MN

1997-1998

  • Computer Programming Certificate Course

Interests

  • Programming Languages.
  • Revision Control Systems.
  • Unix Like Operating Systems
  • Project Management activities.
  • Practice Martial Arts weekly.
  • Fine Art and Popular Art of all kinds.
  • Software Patent Law, and General Law.

2010/11/29

2010/10/23

Esthers Follies (and Politicks)

Had a great time seeing Esthers Follies, in Austin Texas. However...

Esthers Follies would be much funnier if it wasn't so chock-a-block full of the kind of (hate to use limbaughisms, or the lines of thinking stemming from limbaughnese folk[yaknow, ditto-heads, I still love you, but critical thinking is sometimes lacking in your crowd], because he's a douchebag fat tick of a man, demonstrably, and loves government when it's staffed by his football team of Dicks and Chainsies) exclusively aimed at media-caricature Right Wingers. It's still funny enough to be worth seeing and enjoying for the performers quality antics and delivery, however. And they do poke alot of fun at media-caricature Lefties, don't get me wrong.

Perhaps it's merely a matter of genuineness of delivery coming from an arguably more Lefty bunch of folks with respect to chosen subject matter.

2010/09/28

Simply getting at a resource file in a Jar in Java.

Accessing resources in jar files.  I came across a need for this while attempting to not hard code in Java the some data that would be loaded into a HashMap.  The xml in question was conforming to NetBeans default '.ent' file naming.

Sifting through lots of cruft, applet loading specifics and other somewhat useless but informative and educational blather, I eventually ran across http://forums.sun.com/thread.jspa?threadID=5123126 and was rewarded with a straightforward snippet:

use : this.getClass().getClassLoader().getResourceAsStream(name)
example: myClass.getClass().getClassLoader().getResourceAsStream("res/my.gif")

two tips:
1 - use your own class that is in jar file. if used another class - for example Object - fails
2 - name i.e. resource must be without leading '/'

I then repurposed accordingly, since I was assuming XML for my org.w3c.dom.* stuff to parse the config with, I needed an InputStream implementation that could later be passed to the document object I was going to be letting those wonderful modules build for me.


InputStream xmlinstr = this.getClass().getClassLoader().getResourceAsStream("SomeFileAtTheRootOfMyJar.ent");

2009/10/21

Reclaim the word Liberal!

"I am a Liberal. By definition this word means "free man". The root of the word is Latin and is "LIBER" meaning FREE. To free a man is to liberATE him. Once he has that freedom he has liberTY. A free-thinking individual would (in a perfect USA) be a liberTARIAN (I have disavowed my membership with this party since the nomination of Bob Barr last ... Read Moreyear). If you freely give you give liberALLY. A soccer player who freely roams the field is called a liberO. Too many people have made this a disgusting word and it is NOT disgusting to be FREE or to want FREEDOM. BE A LIBERAL and help us ALL be liberals, proudly! Rise from the cognitive misunderstanding of this word to the definitive beauty of it and embrace its essence my brother! Semper Fidelis and Semper LIBER!" -- Adrian Scott Parks

2009/08/04

Timezone configuration on SLES Linux

Having some trouble with clock drift with 2 SLES 9 SuSE linux boxes. Turns out vmware and the hwclock settings I chose during setup of the OS have been conspiring to put a long drift on my two systems. Fixing it is somewhat simple. Setting it up right the first time is obviously the best solution. To remedy:

Do this stuff to get your time figured out and fixed to where you want from an OS perspective:

Totally stolen from: http://www.planetmy.com/blog/how-to-configure-timezone-on-sles-linux/

The following tutorial will guide you How to configure TIMEZONE on SLES Linux.

Basically you can configure Linux timezone using two methods which is using command or YaST.

Note: use timezone “GMT+0“ for an example below.

For YaST timezone setup, it’s pretty simple. Login to terminal and type:

#YasT Setup

yast timezone

Select Global, select GMT+0
Hardware clock Set To: Localtime
Click Accept.

For command line setup, you’re require to know these 2 files /etc/localtime and /etc/sysconfig/clock.

#Backup existing file

mv /etc/localtime /etc/localtime.old

cp /etc/sysconfig/clock /etc/sysconfig/clock.old

#Edit configuration files

ln -s /usr/share/zoneinfo/GMT+0 /etc/localtimevi /etc/sysconfig/clock

TIMEZONE=GMT+0

HWCLOCK="--localtime"

Bear in mind, you can have different timezone setup for individual or global user by using user profile in your system. For an example,

#Edit configuration file

vi /etc/profile or ~username/.bash_profile
export TZ=/usr/share/zoneinfo/Asia/Kuala_Lumpur

Export “TZ” will overwrite /etc/sysconfig/clock or /etc/localtime setup. Mean that I can use Kuala Lumpur as my separate time zone for particular user in the same system eventhrough my primary timezone setup is GMT+0.

NTP setup
#Edit NTP configuration file

vi /etc/ntp.confserver 0.europe.pool.ntp.org

server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org
server your.ntp.server

#Restart NTP Server

rcxntpd xntpd restart

Hardware Clock

#showing hardware clock

hwclock --show

#set the system time from the hardware clock

hwclock --hctosys

#set the hardware clock from the system time

hwclock --systohc

Done!


After doing this verify your clock isn't drifting crazy by using ntpq and lpeers to figure out your clock delay offset and jitter numbers. Seems to work well, saves us some trouble in the future maybe it'll help someone else out of course.

Failing that this thread on the vmware community website illustrates the "clock=pit" option.

URL TO FOLLOW

It refers to this PDF:
http://www.vmware.com/pdf/vmware_timekeeping.pdf

2009/05/15

SSH Passwordless Authentication

http://blogs.translucentcode.org/mick/archives/000230.html was a great find today. Hail google. Hail clarity in technical documentation.

Keep in mind this is dangerous to do if you don't trust your overall account security, but for my purposes at work it's a great way to get something done.

2009/04/03

Playing with Crosstool

Not really playing.

Crosstool itself
A version of GCC to compile the compiler (usually something somewhat old)
A GCC Compiler to Compile (usually something new-ish)
A version of glibc
A "sanitized" version of the linux kernel headers


Google Search For Crosstool: http://www.google.com/search?q=crosstool
A quickie script to gather difference between(delta) two unix epoch seconds time values.


#!/usr/bin/perl
use warnings;
use strict;
use Date::Manip;
my $delta;
my $date1;
my $date2;
my $err = undef;
print "Thank you for running $0\n";

print "Enter Unix Time Seconds Value Start:";
chomp($date1 = <STDIN>);
$date1 = ParseDateString("epoch $date1");
print "Enter Unix Time Seconds Value Finish:";
chomp($date2 = <STDIN>);
$date2 = ParseDateString("epoch $date2");

$delta = DateCalc ($date1,$date2, \$err);
print "the \$delta is [$delta]\n";

2009/04/01

Bash Tidbit: environment variables after escaped semicolons

If you find yourself in need of embedding an environment variable in a path directly after an escaped semicolon (something that happens when you have version control tools like Telelogic, which use semicolons as a project toplevel node delimiter) it is possible to merely use backticks "`<around the command>`" to get the desired effect.

Say your default case on the command line to list the directory contents is thus:


ls /mnt/buford/d/teledb/ccm_wa/poobits01/foo.bar\;foo.bar99.99_int/foo.bar/


And you want the 'foo.bar99.99' to be something settable in a shell variable called $REL you then would insert the following to do such a thing:

REL=foo.bar99.99
ls /mnt/buford/d/teledb/ccm_wa/poobits01/foo.bar\;`echo $REL`_int/foo.bar/

2009/03/06

Time Wasting For Fun and Profit

Someone at work mentioned this gamey game: http://www.kongregate.com/games/garin/monsters-den-book-of-dread

Might try it, never know.

Cicada Period Blogging at it's finest.

2008/11/18

Heads and Tails of the last file in a directory.

head -n 2 `ls -1rt | tail -n 1` ; echo "...";echo "..."; tail -n 1 `ls -1rt | tail -n 1`

2008/11/13

Screen, act like an xterm

Screen when invoked has a multitude of options, but one that was particularly helpful for me was this:

screen -T xterm ssh user@someunixhost

So as to make the TERM environment variable appear to be xterm allowing vi and other tools to work properly.

Figuring out how to get that into my ~/.screenrc so that it takes affect every time is the next objective. Not many of the hosts I connect to identify "screen" as a TERM type.

2008/08/19

Obama's Newbie Activists: Unloved By Insiders But Here To Stay

You should ask those more "seasoned" individuals, who there house is built to serve? Their own well being or the well being of the people of this country? Whether in the Republican or Democrat party, I've found that (with some exceptions in each of course) the established members of each organization are convinced of their own entitlement to lead and control things than they are of operating as an organization of free people acting together in the mass of people that make up the parties interests.

Both parties should lean towards the latter half in future or get more Liebermans and might as well be neocon / pseudodem types in your ranks.
About Democratic Convention
Read the Article at HuffingtonPost

2008/08/13

Say It Ain't Jew, Joe


A very effective PAC working in the US to advance the interests of the nation of Israel

* not the people of Israel as about half of Israelis believe the US aids Israel too much, which is saying alot.



You don't have to read conspiracy into it either, it's just a case of one country having a very effective lobbying organization that is getting what more than what it pays for from the US government. That lobbying organization is acting in the interests of hard line militarists in Israel. These folks want to stay in power indefinitely, apparently seeing that the best way to do that is to keep tension high in the region, peace is best kept short lived, military funding is perpetual and plentiful, and best of all we(the US) look like the bad guy.



Lieberman is a friend to them, at all costs it seems.



Contrast AIPAC with JStreet the latter being a more worthy lobbying group IMO. Essentially saying, perpetual shows of "strength" and ever escalating conflict is maybe not such a good idea, go figure.
About Barack Obama
Read the Article at HuffingtonPost

2008/08/11

Meh, more code stuff this time, playing with Perl's FileHandle modules.

Code like:
  1. #!/usr/bin/perl -w

    use FileHandle;
    my $ifh = new FileHandle;
    if ($ifh->open("< fee.txt")) {
    print <$ifh>;
    $ifh->close;
    }



2008/07/14

Obama Campaign Manager Airs Cash Woes In Video


About Barack Obama
The EFF is the Electronic Frontier Foundation, notably active against the current FISA laws set of compromises and willy nilly allotments of warrantless wiretaps to aging chimpanzees and bloated curmudgeons currently in office. Oh and telecom immunity too, for the (telecom) business set to safely feel free to continue to roll over when some spook gives them a call.
Read the Article at HuffingtonPost

2008/06/11

Apache Commons

Java is an obtuse beast, written by obtuse beasts.

I will be detailing efforts to use the apache commons io framework (DirectoryWalker in particular) in this post.

Apache Commons consists of several helpful extensions to Java in various areas, IO in particular being the one I'm interested, though Math and XML processing code exists for anyone to take advantage of.

Problems that I'm currently working through:
  • DirectoryWalker seems to include mechanics for depth limitations, but the default means of shuffling the File objects returned seems to be an Array, the search process itself seems to dive into the filesystem in a chaotic and unseemly way, that does not lend itself to being easily limited to a certain depth.
  • Java in general, is somewhat defiant of concrete scrutiny to non domain level experts. So, if one isn't already an expert Java programmer, one cannot take at face value the indications of the documentation for modules involved.
At the moment, I'm determining if indeed I can throw a DirectoryWalker.CancelException and how much more code I'll have to write to do something that is quite simple in a shell script (gnu find, and the parameters --maxdepth --mindepth) in order to mitigate the lack of an ability to constrain a directory walk to an exact distance from a starting point.

From the documentation:
This class operates with a FileFilter and maximum depth to limit the files and direcories visited. Commons IO supplies many common filter implementations in the filefilter package.

References:
(http://commons.apache.org/io/api-release/org/apache/commons/io/DirectoryWalker.html)

2008/05/06

Deciphering HPUX 11.0 era compilers and how they tend to fail to build Chinese code (zhchs, zhcht locales) when it is attempted at my workplace, on certain machines.

What this all brings to mind is the tendency of Unix System Administrators to "poison the pool" so to speak by *not* documenting their setups. I'll put this simply for anyone who is a Unix / Linux advocate in todays world of computing, Unix is difficult enough to understand for people who understand it. Throwing shit together and putting it in production with no supporting documentation creates no end of grief when the eventual (and certain) leaving of your job occurs. Unless you want your name to be cursed nigh unto eternity by those that follow you, DOCUMENT YOUR SETUPS AS YOU GO.

Thank you, and good night.

2008/03/04

Pflugerville, Texas - Hanovers Market, a great place for Beer, texas BBQ and friendly outgoing bartenders that will let you hop on over and wrangle your own beer of choice in the back with the taps.
Posted by Picasa

2008/01/14

The Smear of Smears, Racism and Ron Paul

Currently working on expansion on this trackback:

http://haloscan.com/tb/sonichost/3905451830583339730

2007/12/20

Ubuntu Geek -- Tips,Howtos,Tutorials and Articles about Ubuntu Linux (Dapper - Edgy - Feisty - Gutsy)

I've been digging this site the past few hours, finding things to tweak with my ubuntu installation. Very valuable collection of resources for the Ubuntu users out there.

Ubuntu Geek -- Tips,Howtos,Tutorials and Articles about Ubuntu Linux (Dapper - Edgy - Feisty - Gutsy)

2007/12/03

NIN Remixes

Political Dystopia never sounded so good, yet again.

Y34RZ3R0R3M1X3D is out, and I give it my blessing.

  1. Guns by Computer (Saul Williams)
  2. The Great Destroyer (Modwheelmood)
  3. My Violent Heart
  4. The Beginning of the End
  5. Survivalism_tardusted
  6. Capital G
  7. Vessel
  8. The Warning
  9. Meet Your Master
  10. God Given
  11. Me, I'm Not
  12. Another Version of the Truth
  13. In This Twilight
  14. Zero-Sum

2007/11/30

Blog Aggregates: McCain vs Paul and others.

In reference to the McCain Paul Letter on Andrew Sullivans The Daily Dish struck me. I don't have the same reverence for McCain for various reasons, but I feel for those that see their heroes go down the wrong path nonetheless.