Mocking an EF6 DbContext Aug 02, 2018 The official Entity Framework documentation has some nice tips on how to write tests against code that uses a DbContext. It boils down to marking the DbSet properties inside the DbContext as virtual, and preferably, using the IDbSet interface rather than the actual implementation. In addition, I like to create an interface holding just the IDbSet properties and the SaveChanges() method rather than passing down the actual DbContext everywhere. This allows me to setup my mocking even further and set it up nicely via dependecy injection if needed.
Setup an IIS reverse proxy for Atlassian Bamboo Jul 27, 2018 Ever since Atlassian stopped offering Bamboo as a cloud hosted solution we have hosted our own on-premise instance. This has been working quite well, and our instance has always been accessible from the outside. Because we allow people to work from home and our other development tools are cloud hosted, this was a logical decision. We recently migrated our SSL certificates to Let’s Encrypt. Since all our other websites are running on IIS, we used the awesome win-acme tool to handle the certificate renewal process.
Automatically cleanup Gmail Jun 04, 2016 Gmail is wonderful. Whether you are using the free version or using a Google Apps account, it’s a hard-to-beat service. Since it’s launch it has revolutionized the amount of free storage available for emails and it’s still growing every day. However, it does lack some fairly simple features when you are used to full-blown desktop clients such as Outlook, Evolution or Thunderbird. The one I used to miss the most is the option to automatically delete emails which are older than a given date.
Install Cacti on Ubuntu 16.04 LTS (Xenial Xerus) May 22, 2016 At the time of writing, the default installation of Cacti on Ubuntu 16.04 seems to be broken. When running the installation command sudo apt-get install cacti you will be presented with the following error message: When confronted with the above error message, choose ignore. The installation will report a failure. The problem is that the database port value is empty. MySQL seems to report this as a warning, but dbconfig-common still threats it as an error.
NUnit on a Bamboo Elastic Instance Nov 11, 2014 The elastic images provided by Atlassian don’t provide NUnit support out of the box. In my previous post I outlined how to set up your own AMI and use this to set up your own elastic image configuration in Bamboo. It’s important to know that it doesn’t seem like you can modify the configuration of a running agent, so you might want to start this one from scratch. Installing NUnit To install NUnit on your remote instance, simply Remote Desktop into your EC2 instance and install NUnit like you normally would.
Moving a Default Elastic Bamboo Image Nov 08, 2014 Atlassian’s OnDemand products are great. The power of Jira, Bamboo and the likes without the need to maintain a set of servers yourself. When you sign up for their Bamboo service they provide some ready-made Elastic Instance Image configurations which can be used as a starting point to set up your own build servers. Unfortunately they reside in the US East region and you cannot access them from any other region.
Run Jekyll on Windows Oct 29, 2014 Julian Thilo created an excellent website on how to run Jekyll on Windows. I choose to install everything using Chocolatey and that requires some extra configuration. Every command was executed using an elevated command prompt. Installing Ruby and Ruby DevKit choco install ruby choco install ruby2.devkit After everything has been installed you might have noticed the installation of ruby2.devkit logged a warning message. It failed to find the Ruby installation folder which means we have to add it manually to the devkit’s config.
Removing obsolete kernel versions Mar 09, 2012 A couple of days ago I ran into a problem with an Ubuntu server I use. It has a fairly small root partition, but after an update it seemed I ran out of disk space. As it turns out, when updating to a new kernel some older files are not properly removed when using the sudo apt-get autoremove command. Luckily, with a few command line tricks the obsolete files can be removed.
Calculate a duration between dates in Drupal 7 Sep 19, 2011 For a small project I’m working on I need to log the amount of hours I spend on it. The internet lists a great number of applications which can achieve this, but either they cost a lot of money are are bloated far beyond my needs. Luckily I have some Drupal experience, so I quickly put together a content type with a title, and a date field that contains a start and an end date.
PhpMyAdmin WSOD after changing apache run user Aug 31, 2009 If you’ve ever installed Apache and phpMyAdmin on Ubuntu 9.04 and you changed the Apache run user and group to your local user (because it’s a lot easier when developing that way) you will most likely have encountered a WSOD when loading the phpMyAdmin page. The reason behind this is that the permissions of those files on your system are no longer correct. Luckily this can easily be solved by changing them back.
TomTom XL QuickGPSFix Update Issue Jun 20, 2009 I have a TomTom XL GPS and I am quite happy about it. One of the nice features TomTom provides is QuickGPSFix. It basically contains ephemeris data of where the different GPS satellites will be for the next 7 days and easily reduces the time it takes to get a GPS signal, in my car at least, from over 3 minutes to under 20 seconds. Big plus. Unfortunately this seemed to have stopped updating a couple of weeks ago and I couldn’t quite figure out why.