§ Computers & Technology
Saturday, January 23, 2010
The 2010 Heartland District Technology Conference Schedule
Yet another technology conference season is upon us!
There a many great events being planned and some are already announced.
Here is a short list of events and links to their websites. Save this link, as I hear of new events I’ll make sure to update this blog post to add them. Just a reminder that most of these events are in the “Heartland District” as defined by Microsoft which includes Michigan, Ohio, Kentucky and Tennessee but I’ll add events in other neighboring states as well. Don’t mistake me, this isn’t just a list of Microsoft events either! Any technology event in the area that I hear about I will list. If you know of any drop me a line and I’ll get it added!
February 2010
Grand Rapids Code Retreat - Grand Rapids, MI - February 6th, 2010 (Free)
March 2010
Roanoke Code Camp - Roanoke, VA - March 13th, 2010 (Free)
Southern Maryland Give Camp - St. Mary’s City, MD - March 19th - 21st, 2010 (Free)
Lansing Give Camp - Lansing, MI - March 26th - 28th, 2010 (Free)
April 2010
Pittsburgh Code Retreat - Pittsburgh, PA - April 3rd, 2010 (Free)
Philadelphia Emerging Technologies for the Enterprise - Philadelphia, PA - April 8th - 9th, 2010 ($325.00)
Philadelphia Code Retreat - Philadelphia, PA - April 10th, 2010 (Free)
Kalamazoo X Conference - Kalamazoo, MI - April 10th, 2010 ($35.00 Professional / $15.00 Student)
Great Lakes Ruby Bash - Lansing, MI - April 17th, 2010 (????)
Grand Rapids Silverlight 4 Firestarter - Grand Rapids, MI - April 17th, 2010 (Free)
Pittsburgh Code Camp - Pittsburgh, PA - April 17th, 2010 (Free)
May 2010
Ann Arbor Day of .Net - Ann Arbor, MI - May 1st, 2010 ($10.00)
Chicago Code Camp - Chicago, IL - May 1st, 2010 (Free)
Stir Trek: Iron Man Edition - Columbus, OH - May 7th, 2010 ($25.00)
IndyTechFest - Indianapolis, IN - May 22nd, 2010 (Free)
June 2010
CodeStock - Knoxville, TN - June 25th - 26th, 2010 ($55.00)
July 2010
Ann Arbor Give Camp - Ann Arbor, MI - July 16th - 18th, 2010 (Free)
Cleveland Give Camp - Cleveland, OH, July 16th - 18th, 2010 (Free)
August 2010
DevLink - Nashville, TN - August 5th - 7th, 2010 ($100.00)
September 2010
Ohio Linux Fest - Columbus, OH - September 10th - 12th, 2010 (Free)
October 2010
erubycon - Columbus, OH - October 1st - 3rd, 2010 (~$300.00)
November 2010
NO EVENTS
I can’t stress enough how much fun these events are. Not only can you learn a lot of things but you get a chance to hang out and socialize with some of the top developers in the area. I encourage all developers to try to attend at least one local event. You will not regret it!
Monday, May 17, 2010
C# Mutex for running single instance of a program
Here is some sample code that can be used in a c# application to make sure that only one instance of the program can run at a time. In order to do this you will use a Mutex (Mutual Exclusion) which is a type of system wide lock. In laymens terms a Mutex is like a claim to ownership of a idea. You’re telling the world that no one else can have that idea as long as you are holding claim to it. As so as you don’t need it you can let go of the ownership and then someone else can claim ownership.
Sample Code:
class OneAtATimePlease {
// Use a name unique to the application (eg include your company URL)
static Mutex mutex = new Mutex (false, "oreilly.com OneAtATimeDemo");
static void Main() {
// Wait 5 seconds if contended – in case another instance
// of the program is in the process of shutting down.
if (!mutex.WaitOne (TimeSpan.FromSeconds (5), false)) {
Console.WriteLine ("Another instance of the app is running. Bye!");
return;
}
try {
Console.WriteLine ("Running - press Enter to exit");
Console.ReadLine();
}
finally {
mutex.ReleaseMutex();
}
}
}
A good feature of Mutex is that if the application terminates without ReleaseMutex first being called, the CLR will release the Mutex automatically.
As you can see it’s pretty simple code. You create a Mutex object. However, until you call the WaitOne function you do not actually make your claim to ownership of the mutex. So remember to do that!
* Disclaimer: This code and content are taken from multithreading in C# by Joseph Albahari. I do not claim any ownership or rights to this content. I am merely copying for my own future reference and to share the knowledge.
Monday, March 22, 2010
Setting PreLogin Banner on SSH Server
If you are running your own server I’m sure you’ve thought about setting your own login banner for SSH connections. This can be handy to post any important information such as service notices or a legal warning before a user logs in. You can see a sample login banner below in this screen shot.

This is extremely easy to setup
Step 1: Login in as root and navigate to “/etc/ssh”.
Step 2: create a file named “sshd-banner” using your editor of choice.
Step 3: create your banner content and save the file.
Step 4: open “sshd_config” for editing.
Step 5: Add the following line to your config file “Banner /etc/ssh/sshd-banner” and save.
Step 6: Restart the sshd server. On a linux server this would be “/etc/init.d/sshd restart”
Feel free to log back into your server to test.
Monday, March 01, 2010
Backing Up Windows Shares & Settings
If you ever have a need to save a windows servers file shares & settings here’s how to do that. This is handy if you happen to be transitioning to a new file server and you have a lot of shares that need to be transferred. You could always do it by hand but this way will save you a lot of time!
Open up your registry on the server and navigate to:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares]
Right click on the Shares folder and choose export
You will now have a .reg file that you can copy and install on the new server and have all the file shares and security settings ready to go.
One note to remember is this only works if you setup the file shares identically on the new server. You have to keep the drive letters and folders matching the old server.
Sunday, February 21, 2010
Inside Microsoft SQL Server 2005: The Storage Engine

Inside Microsoft SQL Server 2005: The Storage Engine by Kalen Delaney
I read this book to gain some deep knowledge about how SQL Server 2005 works on the inside. My goal was to better understand how to install, configure and manage a SQL Server 2005 database. I learned a lot about tables and indexes and log files and how all if it works together and can be tweaked for better performance.
This is a must read for anyone that spends a lot of their day working with SQL Server 2005!