Whatever you do will be insignificant, but it is very important that you do it.
- Mahatma Gandhi

Tuesday, December 01, 2009

Listing the files of an installed rpm package

Today I was working with some packages at work that needed some updated python bindings in order to work.  It was getting some old libraries that were apparently first in the path, so I needed to get rid of the old stuff.
rpm --query --filesbypkg subversion
This listed all the files that the subversion rpm had installed.  This ended up being very useful.
Hopefully this helps somebody else when tracking down a file.

Tuesday, November 03, 2009

Software Bugs Abound

I just reloaded my work laptop with Ubuntu 9.10.  For the most part, I love it.  It's done well on most everything I've thrown at it.  However, this afternoon I ran into a few issues.  As usual, the problems came fast and furious while I was trying to get some important things done.  The first issue I had was with the vpnc Network Manager integration.  After installing and inputting my information, it began giving me an error about missing some keys.  After a little bit of research on the web, (more than I wanted to do when I was trying to hit a deadline), I discovered that a few people had their problems resolved after a reboot.  I gave it a shot, and it works great.  Then, I needed to check my email on a vmware server 2 installation at work, so I put the address into the bar and....Nothing.  After several tries, I noticed a ton of errors in the error console.  Some more unwanted searching resulted in finding out the VMWare Server 2 doesn't support Firefox 3.5, or at least didn't in the version of VMWare Server that I was running.  More updates.  When it rains, it pours.  Hopefully I can get things figured out so that I can get down to business.

Monday, August 31, 2009

Internet Explorer Javascript Bug using Subscripts

While working on a project for somebody at work, we found a situation in which some script was working perfectly in all browsers, but was crashing in Internet Explorer 6.0. It turned out that if you use subscripts to access characters from a string, it gives an error. You have to do string.charAt(0) instead of string[0]. Just thought it would be something nice to note, if you ever have problems with that.

Thursday, August 06, 2009

Configuring Subversion with Apache

For work, I've been tasked with creating a subversion server that uses apache for an access layer and for authentication. To get this working, I decided to compile both subversion and apache from source. This allowed me to get the latest versions of both tools, and to be able to specify portions that I wanted either included or excluded.
The first thing that I did is to compile apache. I used the configure line:
./configure --prefix=/opt/httpd --enable-mods-shared="all"
The make; make install;
Then I configured subversion with the following options:
./configure --prefix=/opt/svn --with-ssl --with-apxs=/opt/httpd/bin/apxs --with-apr=/opt/httpd --with-apr-util=/opt/httpd
Then make; make install;
One problem I ran into was that initially I didn't have the apr-util portion added, and it didn't seem to work. I'm not 100% sure that it ended up being the problem, but it shouldn't hurt.
After that, I created a repository using svnadmin create and then added the location to the httpd.conf. Then I tried to access it over the http using a browser. It seemed to not work. I found on the web that many people had apr mismatches and things like that, but I ruled that out after some searching. Then I realized that the problem was possibly a permissions issue, so I changed the permissions on the repository. I tried again and things were still not working. Finally, I found a resource on the web that indicated that you might need to check permissions on directories above the repository. In this case, I had created the repository as root on /root, and I had to change the permissions of /root to allow apache to access it. Everything seems to be working now. Hopefully anybody else who is trying to make a setup like this will benefit from this information.

Thursday, July 23, 2009

Interesting Advice on Money Management

Found an interesting article today, which was linked off of lifehacker.
http://www.fivecentnickel.com/2009/07/22/save-money-by-questioning-your-purchases/
Sounds like a great idea that lots of us could benefit from. I know that I've certainly made purchases that within a few days I was wishing that I could have back. Anyway, I think this is a great idea that I'm going to try to implement in my life, and I hope it helps others as well.

Thursday, July 09, 2009

Renaming a Tool Suite

At work, we're generating a "next generation" set of tools. We wanted to create a new name to help differentiate the new tools from the old tools, but we also wanted to start with the same code base as the old tools. To accomplish this, we needed to change all references to the old name into the new name. To do this, I used the following commands:
This one finds the actual files and directories with the "Old" names and changes them:
for f in `find | grep Old`; do export A=`echo $f | sed 's:Old:New:g'`; mv $f $A; done;

The short explanation of this command is that it finds all files with Old in the filename, then determines what the filename would be replacing Old with New, and then moves the file. This may have to be run several times, since the parent directories may be renamed before the child directories are reached.

Then we had to replace all references to the Old tool name in the actual files:
find -exec sed -i "s:Old:New:g" {} \;

This just finds all files in your directory, and uses sed to do an "in place" substitution of Old with New.
Hope this is helpful to somebody!

Tuesday, May 19, 2009

Skunked!

I finally got out fishing for the first time this year. For my destination, I chose McTucker Ponds, which is close to the northeast end of American Falls Reservoir. It was a surprisingly quick tritp and didn't take near as long to get there as I thought it would. When I first got there, I followed a sign that said Boat Ramp. This took me to several spots along the river, but nothing that I would classify as a pond. I threw some spinners and salmon eggs in but wasn't getting much action. I was planning on doing some shore fishing, so I didn't bring my waders or pontoon boat, and it made it very difficult to get to the spots on the river where I thought any fish would be. Finally, I decided that I had to have missed something, so I went back to the entrance ey wand went straight instead of turning at the Boat Ramp sign. This yielded a much friendlier looking location. There
were a series of small ponds. Each one had a dock or two and you could drive to about anywhere you wanted near them. I fished 3 or 4 of the ponds for a while. I tried spinners, some worms, more salmon eggs, and some lures that I got at Sportsman's Warehouse while they were closing, but I had no luck. It didn't help that the wind was blowing quite hard, which made it hard to make some of the casts that I wanted to make. I didn't stay for a very long time, but it was nice to get out again.
Today, I was feeling the urge to give it another shot, however, I didn't feel like heading out for another guarantted skunking, so I did what many books that I have read said to do and called Fish and Game. A very nice lady told me that there had been a fish kill and they had not stocked the ponds yet. I was very happy to learn that it wasn't strictly my fishing skills that left my cooler empty, but sad that my anticipated trip was cancelled. Oh well, I will just have to keep in contact with Fish and Game and see if I can get a head's up when there's actually a fish or two in the ponds.

Friday, April 24, 2009

openSuse 11.1 vs Ubuntu 9.04

Recently, there were a couple of new Linux distribution releases that have been causing quite a bit of buzz around my workplace. Many of us have become fans of Ubuntu, but have used Suse for quite a while, so we like to stay informed of where each of the distributions is currently at. I installed Ubuntu 9.04 on my laptop, and had the opportunity to install openSuse 11.1 on an identical laptop for a co-worker. This gives me a moment to briefly compare a few of the things I found in the very short time that I had with the Suse box.
The first thing that I didn't like with Suse is that the wireless card, which in this case was a broadcom card, didn't auto-install. I had to search the internet, and finally found some pages that referred to running the following scripts:
/usr/sbin/install_bcm43xx_firmware
/etc/init.d/network restart
After these scripts, the wireless worked as expected. I found it kind of sad that I needed to connect to the internet and do some searching when the scripts were already with the installation. I wish it would detect that I had that type of card, and offer to run them for me. I liked Ubuntu much better, as it seemed to handle this in a fashion that would be easier for a new user to get running.

Also, openSuse seemed to be trying too hard in the looks department. It had a lot of transparency and floating menus. Kind of weird. Just didn't have a really appealing look to me.

Friday, April 10, 2009

More LibJPEG Fun

As I was compiling the jpeg library, I kept getting errors about ./libtool not being found. It was an easy fix, all I had to do was to change ./libtool to libtool in the Makefile, but I didn't want to do that every time, especially because I was trying to automate and script the build. I found an article that showed passing variables to make, and that seemed to solve my problem.
make LIBTOOL=libtool
That way, I could put it into my build script and everything would be happy, still using
the latest tarball untouched off the internet.

Thursday, April 09, 2009

Apache2, PHP, and LibJPEG

I'm configuring new server software for our internal webserver at work. I went through the build several times, and it kept complaining about not finding libjpeg.so. I finally figured out that you need to pass the configure --enable-shared or --enable-static in order to make the libraries build. Just thought I'd pass along this information, and hopefully save somebody some headache.

Friday, April 03, 2009

Read Only File and Directory Permissions

Today I needed to lock down some data so that it could only be accessed by a particular user and his group. We wanted to make sure that this archive was not modified, so I needed to lock down the permissions. For a long time, I don't think I fully understood that directory permissions are much different than file permissions. To get around this, I did my chmod in 2 steps. First, I did a
find -type d -exec chmod 550 {} \;
This needs to be 550 because the execute bit on a directory is actually an "access" bit. If you don't set it, you can't access the directory.
Then I did:
find -type f -exec chmod 440 {} \;
This gets the regular files and sets them to read only with no world access. Fairly basic, but I thought somebody might find it useful if they're struggling.

Tuesday, February 17, 2009

I'm Back

It's been a while since I've posted on my blog, so I figured I'd post a little update. We had a baby in December. She had some problems and so we had to have her flown to Salt Lake to Primary Children's Hospital. She was there for about 2 months. We recently got her home, but she had to be put back into the hospital after she contracted something, possibly RSV, that was causing her to have problems breathing. She's still currently in the hospital, and I'm at home taking care of our son.
It's been quite the experience. I've learned a lot in the last 3 months. Priorities change quite a bit when you go through something like this. I'm still not perfect, and I don't claim to have all my priorities perfectly in order, but I definitely appreciate things like a nice home, my health, family and friends, good food, and trying to help out others. It's amazing what being the recipient of some charity will do to your desire to serve.
I will probably not do any more book reviews. After reading some of them, it doesn't sound like I have anything really interesting to say about many of them. If I have opinions or original thoughts about some of them, I will try to abstract the thoughts and make some posts. I may try and keep a little update on what I'm reading, and things I'm planning on reading, but I will probably try to avoid boring "I liked this book" posts.