• How to control Windows with Apple Remote Desktop

    If you do not want to use the Microsoft Remote Desktop application as detailed here. You can do the following to allow you to control Windows via Apple’s Remote Desktop application.

    Install RealVNC Server (www.realvnc.com or www.tightvnc.com) on your Windows PC.

    Once installed it will appear in the tray area of the taskbar or in your program files, select options and set a password, and adjust any necessary settings.

    Now on Apple Remote Desktop you can connect to the Windows PC via the IP address. You will have remote control and view capabilities but no other Apple Remote Desktop features such as remote install.

  • Quickly Restore a SQL Server Database

    If you frequently need to restore other peoples DB’s for testing here is a quick way to do so in Microsoft Sql Server.

    1. Open your Sql Server manager
    2. Create a new database (note the names and locations of the created files)
    3. Select the newly created DB and select Restore.
    4. Select from Device and choose the backup file to restore.
    5. Make sure you are overwriting the new database you created, usually quite apparent, look at the path.
    6. Check the log file and database name, modify where needed to the new database and log files (usually under logical name)
    7. Hopefully once set, you can restore the database, proceed hopefully, if not check the error and modify accordingly.
    8. Now you likely need to take ownership of the DB, run the following on the newly restored database to give it sa ownership:
      exec sp_changedbowner 'sa','true'

    Read the rest of this entry »

  • Rails and Microsoft Sql Server

    So you want to connect your rails application to Microsoft SQL Server. The following instructions will take you through setting this up quite simply. This setup is on a a Ubuntu 8.04 server connecting to SQL Server 2000 (we will use the Northwind sample database). The first thing you need to do is install the following gems:

    $ gem install dbi --version 0.4.0
    $ gem install dbd-odbc --version 0.2.4
    $ gem install rails-sqlserver-2000-2005-adapter -s https://gems.github.com

    More info can be found on the sqlserver adapter gem development page. This is just the first step. Read the rest of this entry »

  • Removing the hiberfil.sys

    By default Windows Vista and Server 2008 have a hibernation file equal to the size of the amount of memory you are using. Of you have 12GB of RAM, that will be a 12GB hiberfil.sys. If you are using a small SSD, that would be a killer waste. Removing this file is a quick way to free up HD space, although considering how cheap drives are, you could always upgrade. Furthermore if you are using a virtual machine, you probably don’t need this space wasted either.

    Now I do not know why they do this on the Server version since who hibernates a server (that being said I am sure some people probably do, silly tree huggers). The real bugger with this problem is that shutting off hibernation does not always remove the hiberfil.sys file. Alternatively, what if you want to remove it without needing to reboot the server. I found a very fast and simple way to do this is to launch a command prompt as an administrator and run the following command:

    powercfg.exe /hibernate off

    The other way is to run the disk clean up utility, this will disable hibernation and delete the hiberfil.sys. Instructions on doing this are here.

  • Rails Application and SSL Problem in Internet Explorer

    Recently we ran across a very annoying problem when deploying a Ruby on Rails application running under SSL when viewed in IE7. When we loaded the page in Internet Explorer 7 there was a content security error. This made no sense at all as everything was secure, and even when we hard coded absolute links the problem still persisted. What could possibly be causing this problem.

    Thinking perhaps it was some random HTTP link sitting in the code, the developers went over everything with a fine tooth comb and could not find the problem. Knowing that a secure content error could be the result of a number of things we broke parts out of the page and rebuilt the page one line at a time until we recreated the content error. Low and behold we found a single JS file that was causing this problem!

    Read the rest of this entry »