photo gallery   random image from the gallery
my.firefox.extensions




[05.05.2009] 06:49 - Fixed my VirtualBox Mouse Scroll Wheel Problem

I use Virtual Box on a windows host (Vista 64) running XP Pro guest (because I need to run Visual Studio 2003 which won't install in Vista). In any case, I have never been able to get the scroll wheel to work in any of my VirtualBox guest systems. Then I ran across a possible solution on the VirtualBox forums. Plug the USB mouse in as PS/2 restart and voila! Scrolling works in all of my VirtalBox guests now. Good thing too because it definitely increases productivity.

[05.01.2009] 09:04 - How to get a file's Mime Type from it's file extension in C#

There is a pretty neat way to get this information directly from the windows registry, rather than having to create conditional switch statements based on the file extension or creating your own mime type lookup tables.
/// <summary>
/// Get the mime type for a file based on the extension of the file anme
/// </summary>
/// <param name='FileName'>File or full path including the file name</param>
/// <returns>Source File Mime Type</returns>
public static string GetMimeType (string FileName)
{
	string FileExtension = ((FileName.LastIndexOf('.') == -1) ? 'unknown' : FileName.Substring(FileName.LastIndexOf('.')))

	string MimeType = 'application/octet-stream';
	
	Microsoft.Win32.RegistryKey RegistryKey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(FileExtension)
	
	if (RegistryKey != null && RegistryKey.GetValue('Content Type') != null)
		MimeType = RegistryKey.GetValue('Content Type').ToString()
	
	return MimeType;
}


[12.24.2008] 08:02 - Merry Mithras Everybody

On this eve of Christmas I thought it'd be good to explore the origins of the holiday and the tenants of the dogma which has lead to the Christianity as we see today. The first part will give a quick history of how Mithras evolved into Judeo Christianity and the second part will show you many of the similarities between Mithras and Christianity, whilst the third part will tie it all together in a Christmas bow.

Mithras was a Persian god who was being worshiped 4000+ years ago throughout the Persian empire. Mithras was the son of Ahura-Mazda, the god of the heavens.

Early Babylonians were strongly influenced by Ahura-Mazda/Mithras and by the 6th century BC they had evolved their belief system into Zoroastrianism With Zoroastrianism, Ahura-Mazda became the supreme god of 'Goodness' and a god called Ahriam was the god of 'Evil'. Not long after, in 580 BC, the Babylonians were holding the Henotheist Jews in captivity and during this time the Jews were influenced by many of the Zoroastrians concepts.

In 350 BC Mithras, the Son of the God of the Heavens was sent down to earth and here we will start the list of similarities:

  • Mithras was born of a virgin (Anahita) by immaculate conception.
  • Mithras was born in a stable.
  • His birthday was celebrated by his followers on Dec 25th
  • Mithras was visited by wise men bearing gifts
  • Mithras had 12 disciples, was a traveler and teacher and performed miracles.
  • He was called the Messiah, Redeemer, Savior, “Good Sheppard”
  • Mithras made a Contract (or Covenant) with Man confirming an older contract with God
  • The Persian word Mithras literally means 'Contract'
  • Mithras celebrated a last supper with his disciples before his death
  • Mithras died to atone for the sins of man
  • Mithras was resurrected on a Sunday
  • Mithras ascended into Heaven to rejoin his Father after 3 days
  • Mithras will return to pass judgment on mankind
  • He was known as the judger of souls
  • On judgment day, the dead will arise and be judged by Mithras
  • Mithras will send sinners to Hell
  • Mithras will send the faithful to Heaven
  • On judgment day there will be a final conflict between evil and good.
  • The forces of evil will be destroyed and the saved will live in paradise forever.
  • Mithras is depicted as having a halo
  • Mithras followers drink wine and eat bread which represents his blood and flesh.
  • Mithras followers are baptized
Any of this sound familiar yet? Now remember this all pre-dates Jesus by 600+ years.

OK, so how did we get to where we are today? The Holy book of Zoroastrian was called Avesta of Zarathustra, a book the Jews were aware of. Mithras worship declined with the arrival of the Roman Empire and the concept of “one true god” but was revived later in the Roman Empire. Guess when? The first century AD, the same time Judeo Christianity was being started by a small Jewish following. Remember the Jews, unlike the Romans, had absorbed many of the Mithras and Zoroastrian ideas into their beliefs during their stint with the Babylonians. During this revival period of Mithras where was their central place of worship? On Vatican Hill in Rome and to this day in the catacombs there remain a Mithraic relic of worship. A depiction of the infant Mithra seated in the lap of his virgin mother, while on their knees surrounding them are Persian wise men offering him gifts.

In 325AD, the Roman Emperor Constantine convened the Great Christian Council of Nicea which truly marked the beginning of organized Christianity. The funny part is that previously Constantine was a worshiper of Mithras, before his council of Nicaea began applying those concepts to the newly formed Christianity. They decided to place the center for the entire new religion on Vatican Hill in Rome.

Now the list of similarities goes on, though at this point I think it’s pretty clear that much of the dogma and basis of the Christmas holiday come in fact from Mithras. And thus it is indeed Merry Mithras.

Have a good one.

[06.04.2008] 07:54 - Synergy in Leopard

I've mentioned how cool the cross platform mouse/keyboard sharing utility Synergy is. However, it doesn't run well in Leopard which I just installed on my macbook. There is a solution however, which you can find here.

[04.18.2008] 08:18 - FireFox Download Manager History Retention

It bugs me when FF keeps the download manager filled up with previously downloaded items. I have to look up the about:config setting every time, so here it is again:

browser.download.manager.retention

  • Set to 0 (zero) to clear an item after it successfully downloads
  • Set to 1 to clear after the browser exits
  • Set to 2 to clear it manually (default)

Another handy setting is browser.download.manager.openDelay - which if you set to something like 15000 (15 seconds) then you won't have to see the download manager when downloading small files.

[03.30.2008] 02:52 - SLOW MySQL innodb alters

I like MySQL. I like InnoDB. But damn, when you have a big table with a lot of data in it and you want to alter a column, the change can take hours. And then time out. Apparently this is because when InnoDB is set up to use 1 file for the entire database (as it does by default), when you make changes to the structure of in the global table space, it has to copy the entire database with the new changes and then replace the existing copy. Very IE intensive.

It's really too bad that InnoDB doesn't have anything that allows it to reclaim free disk space when data is removed from a table, because that's what has caused this problem in the first place since the data is no longer needed in the table. The typical solution with InnoDB is to remove the data, export the tables and then re-import. But I can't even get to that part of the process because one of the columns is set to NOT NULL. So if I try to alter the table, it takes hours and then fails. If I try to drop the column it takes hours and then fails. If I try to create a new table based on the old table, but without those columns, it takes hours and then fails. Maybe it's time to look into having innoDB use a different file for each table via the innodb_file_per_table setting. All of those on the edge of your seat, I'll keep you updated.

[03.21.2008] 09:58 - Warren Buffet is buying railroads

I've been thinking this for the past few years, that railroads will become more economical than trucking goods from place to place. They'll still use trucks for local deliveries, but the long hauls will all switch over. I imagine the some travel will begin switching from airlines over to trains as well. That is, unless the airlines come up with some radically different ways to keep their jets in the air more efficiently or with a different power source.

So anyhow, I guess Warren Buffet is on my page with the trains.

'The key is knowing where your cars are at all times,' explains Kremar. Sophisticated software calculates the best way to put different cars together into trains. And onboard electronics assess topography, track curvature, train length and weight to calculate the optimum speed for conserving fuel.

Overall, the Federal Railroad Administration calculates that productivity has more than doubled since 1990.



[11.08.2007] 20:56 - Synergy high CPU load problem

Do you use Synergy? (if not, read here for the description). Are you using a Windows system as the host? Do you encounter problems with it not allowing the cursor or keyboard to work across your other systems when the host system is under high CPU load? There is a solution, in the options of the host system, turn on the option for 'Don't take foreground window on Windows Servers' and voila, you're in business.

The high CPU load bug really frustrated me until I stumbled across this work around. Sadly there still is no fix for the copy and paste bug that forces me to restart the host application 3-4 times a day. Still, it's worth the pain in the ass.

Synergy, what is it?: Remember those clunky KVM switches you used to have to use in order to use one keyboard and mouse over several systems? Well now because of the magic of TCP/IP you no longer need the switch, and as an added bonus, the solution is cross platform as well! You just set up one computer as the host and then configure how the other systems you have are physically adjacent to it. Then, move your cursor to the other systems and you can begin typing. You can even copy and paste between the systems and there is literally no lag for mouse of keyboard actions. One keyboard, many systems. I use it day in and day out to create a 4 screen system (far left, Fedora Core, center two screens, windows host system, far right, macbook). Note that the host system can be on any platform depending on your preference.

Get Synergy

[11.08.2007] 20:49 - The United Countries of Baseball

I haven't posted anything here in a while and since my website/blog was feeling neglected and I saw this back a week or so ago and thought it was neat, I figured I'd share the love. Click on it for a larger version.

Pretty good for an advertisement, it took me 30 seconds to even realize it was an ad.




[08.20.2007] 00:00 - A New RSS feed

I got tired of going to (or forgetting to go) view the NASA Astronomy picture of the day website, so I created an RSS feed to do the job for me (why NASA doesn't already have an RSS feed for it, I do not know). The feed isn't just based on a link to the post for the day but actually includes the picture and description in the feed itself.

Subscribe and Enjoy