Category Archives: Uncategorized

New open source project: Aura

What is Aura? It’s simple: it’s a C# library to make working with MongoDB databases easier. It still uses the official 10gen MongoDB C# driver to work, just makes life less stressful while using it.

Why the name Aura? Aura is the daughter of Ming the Merciless, the ruler of the planet Mongo. Ming is already taken (by a Python project), so why not pick his daughter?

It’s based on Mongol by Ephisys, however, it’s diverged quite a bit since then. However, it should be straight-forward to port your code over. In many cases, its as simple as changing the app setting Mongol.Url to a connection string property, and changing your using statement to using Aura;. That will get you started. There’s also plenty of other useful features that you use that Mongol doesn’t have.

Oh, and its on GitHub. Check it out now! It’s licensed under the Apache Public License v2.0. Feel free to request any changes you want, or go ahead and contribute them. I will most likely accept it if I like it.

Removing Press popup from Marietta Daily Journal Online (www.mdjonline.com)

  1. Download the zip from here.
  2. Open up Google Chrome. If you don’t use it, you should. It’s free!
  3. Click on the wrench (or if you have an updated Chrome version, the 3 lines) on the top right hand corner, and goto Settings
  4. Switch to the Extensions tab.
  5. Unzip the zip you downloaded earlier
  6. Drag mdjonline.user.js to the extensions window
  7. Reload any article on mdjonline.com, and it should be popup free!

This doesn’t hack their servers or anything.. they use 2 divs, one that makes it grey, and one with the popup content. This just automates removing those divs.

UPDATE

You can use this script to remove from any website that uses Press+. Just edit the script before installing it to have the URL of the website. If you know a website that uses it, leave it in the comments, and I’ll update the script to include that site. Until Press+ comes up with a better solution to their problem, I’ll keep exploiting and updating this workaround.

MySQL Server Changes

I’m migrating MySQL from a standalone instance to running on Rackspace’s Cloud Database product. This change will happen over time. Expect your site to be moved over. This does mean a host name change. Customers who need the new host name will get it. Username and passwords should be the same. You can access phpMyAdmin at the same place. Just choose “Reaktix Cloud – MySql 1” for the new server, and “Reaktix Cloud   – Standalone” for the old server.

Entity Framework 4.3 with Code First

So today was my first day trying out Entity Framework’s Code First mechanism. I have to say, I actually like it. Some notes for other people getting started with it:

  • The easiest way to get started is to use “convention over configuration”
  • For entity classes, they should be a POCO. For your ID field, it should be the name of the class with “ID” appended. If the entity class is “TestEntity“, your ID field should be “TestEntityID“.
  • When creating the DbSet<T> getting in your DbContext subclass, name the getter the same as the database table name. For instance, if your database table is named TestEntities, and it corresponds to the entity TestEntity, your getter should be something like public DbSet<TestEntity> TestEntities { get; set; }
  • Name your DbContext subclass the same as your connectionString in your App.config / Web.config file. For instance, if your DbContext subclass is TestDataContext, name your connection string TestDataContext as well, for instance like: <add name=”TestDataContext” connectionString=”Data Source=.;Database=TestEntityFrameworkDatabase;Integrated Security=true;” providerName=”System.Data.SqlClient”/>

Makes it nice and easy. No other configuration needed in code or any config files. No database metadata files, etc…