2 November 2009 0 Comments

Outlook 2007 error “Cannot open the item for this reminder” error

For some unknown reason, Outlook began to error when I attempted to dismiss the reminder item. After doing some research, I discovered the following Microsoft knowledge base article. The solution is to browse to the MS Office install directory via command prompt, and run the following command:  "%ProgramFiles%\Microsoft Office\Office12\Outlook.exe /Cleanreminders".

If that doesn't work, then start Outlook, go to Calendar, click on "View", then "Current View" and finally select "Recurring Appointments". Remove the item in question to get rid of the error!

28 October 2009 0 Comments

Bugzilla add text to description field

There is an easy way to add your own custom text to the Bugzilla description field. Locate "create.html.tmpl"  under /template/en/default/bug/create/, and then edit it using VI. Look for defaultcontent = defaultcontent and modify it to defaultcontent = "[CONTENT]".

28 October 2009 0 Comments

AutoIT map network drive

I had a small project that involved looking-up an IP address of a host, then use that IP address to map a network share. Below is what I came up with. Note: the variable '$me' was declared earlier on in the script.

 
; Read host list
$input = FileOpen("C:\host-list.csv", 0)
 
While 1
	$line = FileReadLine($input)
	If @error = -1 Then ExitLoop
	If StringInStr($line, $me) Then
		$split = StringTrimRight($line, 2)
		$drivemap = "X:"
		DriveMapAdd($drivemap, '\\' & $split & '\SHARE')
 
		$oShell = ObjCreate("shell.application")
		$oShell.NameSpace($drivemap).Self.Name = ( "FRIENDLY NAME" & $me )
 
	EndIf
WEnd
 
27 October 2009 0 Comments

MySQL search and replace

Easy query:

UPDATE [TABLE] SET [FIELD] = REPLACE([FIELD],'[SEARCH]','[REPLACE]');
26 October 2009 0 Comments

Windows xcopy batch script

I wrote a small script to copy files from one drive (C:) to the destination (Z:) using a nightly cron:

@echo off
:: variables
set drive=Z:\
set backupcmd=xcopy /s /c /d /e /h /i /r /y

echo ### BACKUP...
%backupcmd% "C:\[SOURCE]" "%drive%" 

:: If you want to exclude certain file types add this ... /Exclude:C:\bat\exclude.txt

:: use below syntax to backup other directories...
:: %backupcmd% "...source directory..." "%drive%\...destination dir..."

echo Backup Complete!
25 October 2009 0 Comments

Xenserver VM won’t start!

For some unknown reason, Xenserver decided to crash, and because it crashed uncleanly, some of the VM guest would not start properly. After reading more about the issue, I discovered that this can happen when xapi is not in sync with the master server in the pool. The solution? I logged-on to the master server and issued the following command: "xe-toolstack-restart"

23 October 2009 2 Comments

My first pumpkin carving experience

Jack-o-lantern

I got to carve a pumpkin with Jonsie. It was fun!

23 October 2009 0 Comments

autoit modify screen resolution

I was looking for a simple way to adjust the monitor resolution using AutoIT. Lucky for me, there is a Nifty function that can adjust the screen resolution. [...]

19 October 2009 2 Comments

autoit running multiple scripts from one source

I'm diddling around with AutoIT and I thought I would share. This is how you would approach calling other executables from one:

 
While 1
$scriptnum = Number(StringStripWS(FileReadLine("test.txt")))
Select
Case $scriptnum = 1
RunWait("1.exe")
Case $scriptnum = 2
RunWait("2.exe")
Case $scriptnum = 3
RunWait("3.exe")
EndSelect
Sleep(1000)
WEnd
 

Enjoy!

15 October 2009 0 Comments

Scmbug error 79 on RHEL5

I was working on installing CollabNet Subversion on an RHEL5 server. A little about Scmbug:

Scmbug integrates software configuration management (SCM) with bug-tracking. It aims to solve the integration problem once and for all. It will glue any source code version control system (such as CVS/CVSNT, Subversion, Git) with any bug-tracking system (such as Bugzilla, Mantis, Request Tracker, Test Director).

My problem was that when I would try to start the scmbug-server daemon, it would fail instantly, and the following would be logged in the activity.log:

** Scmbug error 79: Package 'Bugzilla' not found in installation directory '/usr/share/bugzilla'.
Initialization of bug-tracking system 'Bugzilla' version '3.0.8' failed. This could be due to an unsupported version of this system, or misconfiguration.

After some research, I came up with nothing that would indicate a common problem. It turns out the solution is really simple. First off, you should keep a copy of the Bugzilla bits on the subversion server (assuming they're on two different hosts) to make things a little easier. As you can see, the bits in my case are located under /usr/share/bugzilla but it really doesn't matter where you set it, as long as you modify the daemon.conf for scmbug and specify the correct path.

To rectify the issue, go to your local Bugzilla directory, and run checksetup.pl. This file checks to find the necessary Perl module required by Bugzilla itself to run properly. You have to make sure that you have the core modules installed and available. Otherwise Scmbug will fail miserably, and you'll end up getting frustrated. The modules in question are: CGI.pm, TimeDate, DBI, PathToolsTemplate-Toolkit, Email-Send, Email-MIME, Email-MIME-Modifier and DBD-mysql.

If you're a lazy bastard like me, then you'll opt-in for yum install of these modules. However, you can install them via cpan which is recommended. Once you have those installed, go to your Bugzilla directory, then run checksetup.pl to make sure that all necessary modules are loaded. If they are, then you can run sanitycheck.pl, and then attempt to start the scmbug server.

Good luck and enjoy!

Tags: ,
9 October 2009 0 Comments

XenServer 5.5 CentOS VM and Gparted live

So I decided to increase the disk space on my Xenserver VM guest. Unfortunately, increasing the disk space on the VM isn't as easy to modifying the storage limit. Once you do that, you have to use gparted live to merge the unallocated partition with what you already have. To do this, follow the steps below:

Note: Gparted cannot expand LVM2 partitions. Additionally, there are some additional limitations with the partition schema, so this isn't a guaranteed procedure.

  • Mount your CIFS/NFS share and make sure that you point the VM guest to the Gparted ISO.
  • Shutdown the VM from XenCenter.
  • Select the VM in XenCenter, then go to VM > Start In Recovery Mode.

Once in recovery mode, you will have the option of booting from CD, which should happen automatically. Once that happens, you'll be able to use gparted live to work on your VM partitions.

Enjoy!

27 September 2009 0 Comments

5 years of monotony and crap!

Today, marks the 5th year for willsani.com. I thought I would share it with the rest of the world for no particular reason!

23 September 2009 0 Comments

how to obtain sql 2000 cd key

Here is how:

GO
EXEC xp_regread ‘HKEY_LOCAL_MACHINE’,'SOFTWARE\Microsoft\Microsoft SQL Server\80\Registration’,'CD_KEY’
GO
22 September 2009 0 Comments

Xenserver 5.5 move VE from one storage to the other

I haven't really found a good way of moving the virtual disk from one storage repo to the other, but it is possible to do this through the XenCenter interface:

  • Shutdown the VM guest. Note: I think it sucks that you have to power off the VE, but the convenience of a virtual server pays off at the end of the day, so the 10 minute outage is far better than the alternative!
  • Right-click the VM, select Copy VM.
  • Specify the name for the VM, select "Full Copy", and choose the new SR.
  • Check "delete original VM after copy", and click ok.

At this point, the server will begin the replication and create a new disk image on the destination SR. I'm sure this is easily done using XE in the shell. Once I have it, I'll post back here.

11 August 2009 0 Comments

Will the real Yuri Orlov please stand up?

This man is just fascinating!

11 August 2009 0 Comments

installing pdsh, the hard way!

So, I decided to install PDSH on an RHEL5 i386 host. Was I in for a treat! First off, I couldn't find an RPM for PDSH that was compatible with RHEL5, so instead of trying some flavor of the RPM I decided to build from source RPM. To do this, you have to have the following installed on your RHEL5 host:

  • elfutils
  • libtermcap-devel
  • ncurses-devel
  • pam-devel
  • readline-devel
  • rpm-build

Once you have the following RPM's installed (usually from RHEL DVD), move on to the next step:

  • Download the latest PDSH SRC RPM
  • $ rpmbuild --rebuild pdsh-*
  • $ rpm -ivh /usr/src/redhat/RPMS/i386/pdsh-*

That should do it! Now you can use it to run commands in parallel.

6 August 2009 0 Comments

3 years of monotony and crap!

Today, marks the 3rd anniversary of this blog. I originally started it to distract myself of life during the summer of 2006. At the time I gave myself 6 months before I would grow bored and move on to the next best thing but something within me just told me to keep on blogging. Looking back I'm glad I chose to stay on top of it, and this blog has served me wonderfully.

6 August 2009 0 Comments

understanding linux cpu load

I was looking around for an article explaining the Linux CPU load average, and I found a really good one!

1 August 2009 0 Comments

we feel fine

An exploration of human emotions. Searches for keywords on blogs and displays them in an interesting format.

24 July 2009 0 Comments

tron 2

OMG! They've released the teaser, which is just awesome!!!