Damon Cortesi's blog

Musings of an entrepreneur.

Blondes

| Comments

Came across a good blonde joke earlier today.

It was so good, it motivated me to do the following: Blonde Joke

Unfortunately, I couldn’t start at the root for a few reasons and my technorati API query limit was also hit. But still pretty cool to see. Apparently the Germans really liked the joke. Really interesting to see that element spider out. I’ll have to run it again from a slightly lower point and see what happens.

Thanks to Technorati for their Technorati API that even allowed me to do this in the first place. I initially was going to use Google, but they apparently don’t have an api for their Blogsearch yet. Too bad, Google!

Automating Subversion

| Comments

As I mentioned in the past, I’ve been working on subverting my homedir. I’ve also been putting a great deal of effort into subverting my downloads directory. I have archives that date back to 1999 (ICQ99b, anybody…) spread across multiple CD’s and archive directories collected over time. What can I say…I like history. This made subversion a good fit for this task. I wanted to centralize all my download archives and manage to keep track of their history (should I ever need an old version) and synchronize this across hosts as well. Subversion works particularly well from the history aspect as now I don’t have to have 20 versions of one program all stashed in one directory. I just have one and I checkout the appropriate revision if I need to.

However, getting my archived downloads has been somewhat of an administrative headache. I took a look at some old Kerio downloads, for example, when they were making almost 2 releases a month…and I have most of them. Renaming, copying, committing, and repeat was not sounding desirable after I had already done it several times. So what do I do, of course, but whip up a quick one-liner to do it for me. *Note - I had to enable delayed expansion for this to work. I also had to download the svn binaries (as I was doing this on Windows) and make sure I had an appropriate SSH in my path - I used TortoisePlink and just renamed it…

1
2
3
4
5
6
set SVN="D:\Program Files\TortoiseSVN\bin\svn\svn.exe"
SET OLD=kerio-pf-2.1.5-en-win.exe
B:\Storage Bin\SVN Downloads\Net>for /F "tokens=1,2,3* delims=-" %i IN ('dir /od /b R:
\Download-2004.04.27\Net\kerio-pf-4*') do %SVN% rename !OLD! %i-%j-%k-
%l && copy /Y R:\Download-2004.04.27\Net\%i-%j-%k-%l && SET OLD=%i-%j-
%k-%l && %SVN% ci -m "Update to Kerio %k"

I ran that and in about 3 minutes had 12 Kerio new versions in my repository. What that script does is loop through each Kerio 4 download in the source directory, rename the old kerio to the new kerio name (I rename so I can keep track of versions at a glance, but still keep the update history), copy the new kerio over, update the OLD variable, and then commit the changes and do it all over again!

This is going to make some of the other apps much easier to get added to the repository as well. Man, I love version control.

How appropriate this seems at the moment: I am nerdier than 87% of all people. Are you nerdier? Click here to find out!

Resetting Windows Security Settings to Not Defined

| Comments

As a person that frequently configures my Local Security Settings and experiments with Group Policy on my Windows network, this is something that has always baffled me, but I never really had a problem with it.

Many of the settings in the Windows Security Options settings are “Not defined” by default. For example, note how neither Enabled or Disabled is selected in this policy. [img]

So what happens when you do enable or disable that option, but want to set it back to “Not defined” at a later point? There’s no “Not defined” option and I can’t quite recall right now if there is a way to do this when you’re working with Group Policy Objects…there very well may be.

One option I just discovered though, is simply by hitting the ’

1
d

’ key. Yes, that’s right. Open the security policy, hit

1
d

and the options will be disabled and set back to “Not defined” when you apply or click OK.

MySQL 4.1 Upgrade on Gentoo

| Comments

Like a few others, I had a problem upgrading MySQL to 4.1 on Gentoo. I was faithfully following the upgrade guide and got to the revdep-rebuild part of step 3. Revdep-rebuild said it was going to take the following actions:

emerge –oneshot –nodeps -pv =dev-php/mod_php-4.4.0-r9 =dev-php/php-4.4.0 =net-libs/libwww-5.4.0-r3

However, I got the following error during the first part of revdep-rebuild when it was trying to compile mod_php:

can not run test program while cross compiling

Well that’s definitely odd as I wasn’t attempting to cross-compile. I googled around quickly and found several people with a similar problem (with quite a few in German…) and a couple solutions. I tried re-emerging gentoolkit, but that didn’t help. I then came across Bob Rasey who was having the same problem. Looking through my config.log, it did appear that something was trying to link against libmysqlclient.so.12, which I didn’t have…but I didn’t like his solution of adding a symlink as that seemed somewhat hackish. Gentoo is already sensitive enough, and I didn’t want to take any chances.

Going back through the config.log, I noticed that the test compile mentioned in this thread was failing with the following error:

libmysqlclient.so.12, needed by /usr/lib/libxmlparse.so, not found

A quick

1
equery belongs /usr/lib/libxmlparse.so

revealed that the file actually belongs to libwww. Ah-ha! This is beginning to make more sense now.

mod_php links to libxmlparse, which requires libmysqlclient.so.12. But that’s not there anymore since I upgraded MySQL. libxmlparse is part of libwww, though, which is also slated to be rebuilt, but not until after mod_php. And that is where the problem lies. Re-emerging libwww by itself to get libxmlparse.so to link to the proper libraries and then continuing with the revdep-rebuild solved the problem.

4

| Comments

It’s 4 out. That’s right 4.

I have a new way of measuring degrees - it’s the number of minutes you can walk outside without freezing your butt off!

I think Jason says it best

Security Can’t Be Halfway

| Comments

I was recently on a job where I was analyzing various security settings on Windows XP. In an attempt to automate the process, I create a security template and started playing around with secedit. The template I was using only had a few basic security settings in it as I was just testing the analyzing features of secedit. I also had the GUI interface (Security Configuration and Analysis) open as well. Unfortunately, I wasn’t paying attention and managed to click “configure” instead of “analyze”. Which turned out to be a big oops.

The past couple weeks I’ve noticed things have started to go a little wrong since I did that. The first thing I noticed was that I couldn’t update my anti-virus definitions. Norton would just die when I tried to update it. There were a few other oddities as well, but nothing that prevented me from being productive…until tonight. The project I’m on requires quite a bit of charting and graphing and inserting Excel objects into Word. I fired up Word to get to work tonight, started typing away at some descriptive paragraphs, and then tried to insert an excel worksheet:

word cannot create excel object

Oh no. Then word asked if it could repair it for me, so I said yes and was consequently greeted with a windows installer error 1601. Perfect. I thought maybe I didn’t have the source media, so I went to add/remove programs in the Control Panel, tried to change the Office installation and received the same windows installer error 1601.

Great.

I had a sneaking suspicious this was because of my partially configured security settings, and this definitely started smelling like a permissions problem. I started working in reverse trying to change any of the obvious settings, but as I dug deeper and deeper more things didn’t work. I couldn’t perform various administrative functions, the Microsoft COM+ EventSystem service wouldn’t start, dcomcnfg was crashing whenever I would drill down to the computers folder…this was not much fun. This Microsoft Knowledgebase article about MS05-051 permissions problems had exactly the same symptoms as I did, but I checked the file system permissions and those were fine, and the bypass traverse checking permissions were some of the first I changed back, so those weren’t an issue either. I was getting nowhere fast.

I decided the only solution was to blow away all of my security settings back to the defaults. A quick Google led me right to one of my old favorite sites, JSI FAQ - 5571 ยป How do I reset Windows 2000 / Windows XP security back to the default settings?

secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose

Running that command (I could have probably used the /Areas switch to narrow it down, but I was too anxious) and rebooting got me back on my feet and inserting excel charts and updating my anti-virus in no time.

Excel Tips

| Comments

I’ve been working in Excel quite a bit lately. Here are some useful tips:

  • When using multiple data rows in Pivot Tables, it automatically subtotals each row, which can be somewhat annoying. To disable this feature, use the following:
    Select the ‘product’ label in the PivotTable and from the PivotTable menu, try: PivotTable>Field Settings…>Subtotals>None (select) Source
  • When inserting Excel charts in Word, sometimes you want them to be rotated to landscape view. This can also be achieved simply by doing the following:
    In Word, click where you want the spreadsheet. On the menu bar, select ‘Insert’>’Break’, and under ‘Section break types’ check ‘Next Page’. Insert your spreadsheet, set this page (ie. this section) up as landscape (File>Page Setup…). After the spreadsheet, insert another section break, reset the next section to portrait. Source
  • There are some other useful tips about Pivot Tables that I can’t recall now, but here’s one of them:
    When inserting a “Calculated Item or Field” into a pivot table, the formulas use the “sum” of each item you select…this can’t be changed, apparently. Not the original ref, but a good source nonetheless
    You don’t even know how long I fought trying to figure out why my formulas weren’t working at all…
  • Often times, the need comes up to count the number of unique values in a list. This can be pretty easily done, although it’s not immediately obvious:
    Use this forumla: =SUM(1/COUNTIF(Range1,Range1)). Now this is very important: Press Ctrl-Shift-Enter rather than only Enter; this will tell Excel to make it an array formula. You can use names or ranges in the countif function. Source
    Microsoft had a much more complicated solution that didn’t work for me.
  • This issue comes up quite a bit for me as I frequently combine various workbooks and use autofilter quite a bit. Sometimes, though, it doesn’t display the count in the status bar…it just displays “Filter Mode”. Microsoft to the rescue on this one:
    1. On the Tools menu, click Options. 2. In the Options dialog box, click the Calculation tab. 3. On the Calculation tab, click Manual under Calculation. 4. Filter the list to see the filter results in the status bar. Source

I think that’s all for now. Maybe more later!

Monitoring Apache and MySQL With RRDTool

| Comments

I wrote this post up, but it ended up being pretty lengthy. You can find the full text over here -> Monitoring Apache and MySQL with RRDTool

Here’s the intro text:

I’ve been having some problems with my webhost falling over, so I decided to implement some pretty graphs to help me get a better grasp on what was going on. The issue appeared to be some combination of apache, mysql, and ram usage that would occasionally drain the machine of memory. This is also running on John Companies’ virtual colo service, so I’m not sure if that’s a factor or not, but hopefully I can find that out. They had graciously bumped up my memory limits multiple times, so I was somewhat confident the error was on my side. I was inspired after switching my utility box at home to Gentoo and needing to setup my snmp monitoring tools again. Wanting to migrate to rrdtool, I came across the Advanced SNMP Monitoring with RRDTool and saw that it was quite easy to incorporate other system properties in monitoring data, such as process and disk usage. I’m also going to use this article about Using SNMP and RRDTool on FreeBSD as I don’t want to use MRTG (despite the catchy little jingle I dreamed up about 6 years back to the tune of ‘Getcho Freak On’) to do the polling.

Sunbelt Software to Acquire Kerio Personal Firewall

| Comments

It was just recently announced that Sunbelt software is going to acquire Kerio’s Personal Firewall that Kerio was going to End of Life at the end of this year.

As an avid, and long-time user of Kerio (I still have a download of 2.1.4 from 2002 in my archives), I’m very happy to see this. Kerio is the one firewall product that I’ve used that has allowed me the granular control my anal retentiveness demands without getting too picky. Yes, I’m the guy that only allows Firefox and IE to communicate from TCP ports 1024-500 to TCP ports 80 and 443 as well as a few other exceptions as needed.

Let’s hope Sunbelt doesn’t try to integrate their spyware product or vice-versa…that would be really annoying, even if it is a logical next step.

In other news, further proof that Wayne’s World was not, in fact, based in Aurora but LA. This is a snap of a mysterious “Wayne’s World” door at LAX airport. How odd. Wayne's World...at LAX

$222.58

| Comments

Two-Hundred, Twenty-Two Dollars and Fifty-Eight Cents. Field of Coins That’s the result of over 6 years of hoarding every quarter, dime, nickel, and penny that I’ve laid my greedy little hands on. I discovered that my bank would allow me to just bring it in in a big bag, which probably ended up weighing well over 30 pounds, and they would count and deposit it into my account for me.

Before I let go, I played around with some macro shots. You can view the entire set on flickr - 6+ Years of Change

Guess who’s getting taken out to dinner… ;-)