Saturday, September 27, 2008

Sunday, September 14, 2008

Installing Oracle Calendar on Fedora

This will be the first post in a series chronically my "Can I use Fedora for my work OS?" project. My first task was to see if I could install Oracle Calendar which is our enterprise calendaring system.

In theory this should not be a hard install you can get the installer from oracle.com and unzip that tarball and run gui_install.sh. Of course things never go that easy, the first error I got was this:

Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
awk: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
dirname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
basename: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
hostname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
Launching installer...
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/tmp/install.dir.7150/Linux/resource/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
After doing some research it seems that the LD_ASSUME_KERNEL environment var can cause problems, it is old var used during the time of kernel threading switch. Some apps, mostly java, still have this set and it cuases problems in fedora. The soluction is to turn it off:

perl -pi -e 's/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/' cal_linux


After that I got a missing object error:

libXp.so.6: cannot open shared object file: No such file or directory


This was an easy fix, I just installed the missing lib.


yum install libXp.so.6


The Final error I had was:

libstdc++.so.5: cannot open shared object file: No such file or directory


I checked the lib version and found that I had so.6. My first though was to link this to the so.5 and hope for the best. I decided to first look for a compat library and I found it. The solution:


yum install compat-libstdc++-33

Finally I had a working calendar! Woo Hoo!

Wednesday, September 3, 2008

Techie Haiku

Your razor-sharp wit
Can never stand up to my
Adamantium

Tuesday, September 2, 2008

My Macbook Lives

My macbook experienced some serious issues last Friday. When I boot I get the login screen because I have enabled the root account for various things. When I logged in as my normal user I got stuck at a blue screen that would flash intermittently. It was like the mac couldn't log in. After some painful trouble shooting here is what I did to fix it:

  1. login into the computer using the root account
  2. created a new user called xyz
  3. renamed the home folder  (/Users/xyz)  to xyz_old
  4. renamed my home folder to xyz
  5. rebooted
  6. logged in as xyz
I was able to login as the new user and all my settings were just as I left them.  I did have to type in my password for the keychain but that worked fine.  The best part is I still had my time machine back up just in case.

I need this for my mac

Monday, August 25, 2008

Garcias is rocking

This is the first time we have got my brother to eat at Garcias in
like five years! Mallory is way excited!!!

Sunday, August 10, 2008

When to reinvent the wheel

One of the cardinal rules of software development is to never reinvent the wheel. I have in my ten years of software development strictly adhered to this rule, primarily because programmers are lazy. For the most part it is in your best interest to used tested code the is already written, however sometimes it can be a detriment.

Recently I was working on a project where I wanted to do an auto suggest drop down for a text box. I started off, as usual, slogging through the net looking for something that work. Without too much work I was able to find about three contenders. I downloaded, installed and tested each. None of the three was really what I wanted so I adventured back to the Internet in search of the perfect auto suggest JavaScript and before I knew it I had spent a whole work day (8 hours) just scouring the internet.

I took a step back and wrote:

function suggest() {
var searchBox = document.getElementById('search-form-query');
var suggestions = document.getElementById('suggestions');

var url = 'searchData.cfm';
var pars = 'field=' + searchBox.value;

var ajax = new Ajax.Updater(
{success: 'suggestions'},
url,
{method: 'get', parameters: pars, onFailure: reportError});

suggestions.style.display = 'inline'
}

function hideSuggestions() {
var suggestions = document.getElementById('suggestions');
suggestions.style.display = 'none'
}

With a tiny bit of HTML to help:

<div id="suggestions" style="overflow: auto; position: absolute; background-color: white; width: 150px; height: 250px; display: none;" onclick="hideSuggestions()">This is where the auto suggestions will go</div>

This code took me maybe ten minutes to write and test and it was exactly what I wanted in the end. In the end it was far more efficient for me just to write the code and move on. It's important for programmers to strike a good balance between writing their own stuff and using packages from the Internet.

Saturday, August 9, 2008

How to Pick a Lock with a Bump Key [How To]

I made one :)

Sent to you by Shawn via Google Reader:

via Lifehacker by Gina Trapani on 8/2/08


From the "use this for good, not evil" files comes a fascinating instructional video on how to pick a lock with a "bump key"—a key modified to fit and open any lock. Like the instructor in the video says, thieves have been using this technique for a long time now—so it's interesting (in the "knowledge is power" kind of way) to see how it's done. Before you start making evil plans, keep in mind that most states in the U.S. consider a bump key a burglary tool so don't go getting yourself arrested.
Bump a Lock [How-To Wiki]


Thursday, August 7, 2008

Sunday, July 27, 2008

Monday, July 14, 2008

The iPhone has arrived.



http://www.geekculture.com/joyoftech/joyarchives/1128.html

Wednesday, July 9, 2008

Log rotate final solution


#!/usr/bin/perl -w
use strict;

my $numDays = 7; #Number of days to retain Output Directories
my $numLongDays = 30; #Number of days to reatain archived tars

#get the current date time and break up
my ($sec,$min,$hour,$mday,$mon,$year,$wday,
$yday,$isdst)=localtime(time);

#create date stamp
$year = $year + 1900;
my $dateStamp = "$mon-$mday-$year";

#find out who is running this process
my $who = `whoami`;
chomp $who;

#Get the list of directories
my @baseDirs = `find /usr/peoplesoft/$who/appserv/prcs/* \\( ! -name dir -prune \\) -type d -print`;

#for each dir arcvhive and delete folder from log_ouput
foreach my $baseDir (@baseDirs) {
chomp $baseDir;

#set the path to the directory that has the logs and the archive directory
my $logDir = "$baseDir/log_output";
my $logArchiveDir ="$baseDir/log_output_archive";

unless(-d $logArchiveDir){
mkdir $logArchiveDir or die "Couldn't create dir: [$logArchiveDir] ($!)";;
}

#archive then delete out put folders
system("/usr/bin/tar cvf - `/usr/bin/find $logDir/* -mtime +$numDays` | gzip > $logArchiveDir/log_output_$dateStamp.tar.gz");
system("/usr/bin/find $logDir/* -mtime +$numDays -exec rm -rf {} \\;");
system("/usr/bin/find $logArchiveDir/* -mtime +$numLongDays -exec rm -rf {} \\;");
}

Tuesday, July 8, 2008

Why its important to rotate logs.

Any of you who have been in the sysadmin business for more then a few days know how critical it is to rotate log files. When logs get to big your system will stop working. For example each file system has a maximum file size (http://www.novell.com/documentation/suse91/suselinux-adminguide/html/apas04.html#tab:maxsize) which if reached will cause problems. In the old days linux had a 2 gig ceiling and when your apache access log reached it apache would crash and not come back up. Some times worse.

Today I ran into a new one, in Solaris there is a limit to the number of sub directories that can be created. The magic number is none other than 32,767. We had a process that was storing log files for in there own sub directories. It had been doing this for multiple years and finally it had the lmit. We got this rather unhelp error, mkdir: Failed to make directory "test3"; Too many links.

The solution was rather simple. Tar up and archive the folders and then delete the originals. I set up a quick script to do this monthly and hopefully we will be all set. Going forward I would like to get a more robust solution in place like the standard logrotate. Dare to dream.

Thursday, June 19, 2008

Wednesday, June 18, 2008

Tuesday, June 17, 2008

Uncle Shawn

I just found out that I'm going to be an Uncle, how cool is that? It is totally awesome and scary all at the same time, I cant imagine how my brother feels! It really gets you thinking about life and the whole cycle of things. I'm way excited for this little sea monkey! I cant wait to teach him/her how to calculate pot odds and bluff on the river. I'm already thinking about taking them to scouts and camping and the other nine million other things that will be fun to do.

Congratulations Chad and Mal!!!!!

Firefox 3

I'm very impressed with the latest release of Firefox. I have for a long time switched between safari and Firefox mostly because I love the way safari looks. The native look and feel of safari is fantastic! Not to mention safari is a pretty darn speedy. Firefox has come a long way, the original version looked awful and was very clunky. I would have given up on it if it wasn't for the amazing plugins. Version 3 is just as functional as ever and finally feels like it belongs on the mac. The history looks great and is search able too.

Way to go Mozilla!

Thursday, June 12, 2008

Interviewing

Interviewing is hard work. Its hard to be the interviewee and its hard to be the interviewer. Fortunately I haven't had to be on the interviewer side of the table in quite some time. I'm a fan of Joel Spolsky who writes a fantastic tech blog, his suggestion is that you should look for people who are smart and get things done. That is it. Simple. When I'm on a interview committee that is my Mantra. The problem I have seen lately is that others on the committee have very defined set of things they are looking for that blurs their judgment of the canidate at hand. I believe that at the end of the day you can teach someone to use a tool or set of tools but you can not teach them to think in a different way. Personality traits are hard if not impossible to change and further more we should not want to change a person to fit our job and environment.

Today we did a phone screen for two candidates. Both were technical savvy however one had a lot more programming experience then the other. The one with programming experience certainly could do the technical aspect of the job however the canidate had a hard time communicate at a level that would engage a functional user. This to me is a red flag. We are not going to be able to change this candidates communication style, they have operated this why for years. Trying to shape away years of learned behavior is almost impossible. The other canidate was an effective communicate that understood process and methodology. This canidate was not a strong programmer. In my opinion we can teach programming and we can teach the tool. The good news is we are starting with a clean slate!

My goal when looking at some one to hire is to find someone smart that gets things done. This is the corner stone! After we narrow down the candidates I'm looking for some one that fits the job, the organization and has the innate skills that can't be trained.

Sunday, June 8, 2008

Scripting SCP

I love scp, its easily one of the most used unix commands in my tool bag. That said it is a real pain inf the butt to try and script scp. I was in the midst of writing a little script that would create ssh key pairs and distribute them to a number of servers. On paper this seemed to be almost trivial and that my friends is the problem wit paper. In order to make scp more secure the developers had it communicate using PAM instead stdin, sterr and stdout. Bummer, This meant there was no easy way to supply scp with the users password. So there is no command line option to supply the password and I can't write to it over stidn, I was a little stuck. After searching that Internet, and I mean really scouring, I found a command called expect. Using this I wrote a quick and dirty shell script to do the scp part:

#!/usr/bin/env expect -f
set password [lindex $argv 0 ]
set file [lindex $argv 1 ]
set command [lindex $argv 2 ]

# trick to pass in command-line args to spawn
eval spawn scp -r $file $command

expect "password: $"
send "$password\n"

# wait for regular shell prompt before quitting
# probably a better way using 'wait'
expect "$ $"

With this the whole scripting experience became trivial again, rock on!

Monday, May 5, 2008

Tools Table

SST0101 blog site had started listing out the tools tables. I wanted to post this listing on my blog as well. I have also provided the link to the orginal blog.

Enjoy

Projects

PSPROJECTDEFN — Project header table
PSPROJECTITEM — Definitions in the project
Fields

PSDBFIELD — Fields in the system
PSXLATITEM — Translate Values
Records

PSRECDEFN — Record header table
PSRECFIELD — Fields in the record (subrecords not expanded)
PSRECFIELDALL — Fields in the record (subrecords expanded)
PSKEYDEFN — Indexes
Pages

(Note: Pages still have the name panels in the PeopleTools table names)

PSPNLDEFN — Page header table
PSPNLFIELD — Page controls
PSPNLHTMLAREA — Static HTML Areas on Pages
Components

(Note: Components still have the name panel group in the PeopleTools table names)

PSPNLGRPDEFN — Component header table
PSPNLGROUP — Pages in the components
Menus

PSMENUDEFN — Menu header table
PSMENUITEM — Items (components) on the menu
Security

PSCLASSDEFN — Permission List header table
PSAUTHITEM — Menu items granted security by permission lists
PSROLEDEFN — Role header table
PSROLECLASS — Permission Lists in roles
PSOPERDEFN — User ID header table
PSROLEUSER — Roles granted to users
Portal

PSPRSMDEFN — Content References and Folders
Change Control

PSCHGCTLHIST — shows history of locked definitions with project name, incident, and description
PSCHGCTLLOCK — shows definitions that are currently locked
Application Engine


PSAEAPPLDEFN — header record; 1 row per app engine
PSAEAPPLSTATE — state records assigned to app engines
PSAEAPPLTEMPTBL — temp tables assigned to app engines
PSAESECTDEFN — sections
PSAESTEPDEFN — steps
PSAESTEPMSGDEFN
PSAESTMTDEFN — actions
HTML Definitions


PSCONTDEFN — header record; last update time, etc.
PSCONTENT — stores actual text in the HTML definition

Wednesday, April 2, 2008

Ahhh the symphony

Improv Everywhere presents the Cell Phone Symphony



What is that smell?

Friday, March 14, 2008

Happy Pi Day

It's 3-14 folks which means another Pi Day (http://www.piday.org/) How do you celebrate Pi day?

Pi, Greek letter (π), is the symbol for the ratio of the circumference of a circle to its diameter. Pi = 3.1415926535... Pi Day is celebrated by math enthusiasts around the world on March 14th.

3.
1415926535897932384626433832795028841971693993751058209 7494459230781640628620899862803482534211706798214808651 3282306647093844609550582231725359408128481117450284102 7019385211055596446229489549303819644288109756659334461 2847564823378678316527120190914564856692346034861045432 6648213393607260249141273724587006606315588174881520920 9628292540917153643678925903600113305305488204665213841 4695194151160943305727036575959195309218611738193261179 3105118548074462379962749567351885752724891227938183011 9491298336733624406566430860213949463952247371907021798 6094370277053921717629317675238467481846766940513200056

Sunday, March 2, 2008

Friday, February 29, 2008

Tuesday, February 26, 2008

Wednesday, January 9, 2008

Techie Haiuku

Droning on and on
Talking about the atom
What an awful Bohr.

Monday, January 7, 2008