Snippets / Tools

Simple website stress tool with C# and Apache HTTP server benchmarking tool

To be honest, I got bored trying to remember all switches and combinations of Apache’s benchmarking tool! Since I use it sort of rarely, I just wrapped it in a convenient -for me at least- app that I can use without having to remember or read anything!

This is my simple implementation of a website stress tool that uses Apache HTTP server benchmarking tool to get results for any request. Just follow the link for my github account, download, build, and use 🙂

Read More »Simple website stress tool with C# and Apache HTTP server benchmarking tool

Export MS SQL Database schema with C#

A few days ago, I was searching for a way to export MS SQL schema of all databases of a server for backup and migration purposes. Although I found some tools, what I needed was a way to get stored procedures, functions, views, triggers and everything even if it was encrypted.

Since I couldn’t find a way to automate this (e.g. run it every night to backup schema of my server), I thought it would be a nice weekend project.

Read More »Export MS SQL Database schema with C#

C#: Calculating Orthodox and Catholic Easter

Some time ago I was called about an online calendar for a company’s portal. The need was to inform employees about public holidays for the requested year. In Greece, some of those holidays are static, meaning they occur the exact same date each year, and some are based on the Orthodox Easter, so they move from date to date. There are a lot of online services that can return these information, but I thought I should give it a go and try writing the Orthodox Easter calculation offline. Saying that, I found the algorithm online, and since I was there I also found the Catholic Easter algorithm.

This is a post for the calculation of the two Christianity events, and in a later post I will also publish the public holidays calculation.

(Have in mind that since the methods return DateTime, “every possible year” is not quite accurate! And besides this, both algorithms have problems after year 4200. You can read more about it here: http://en.wikipedia.org/wiki/Computus)

Read More »C#: Calculating Orthodox and Catholic Easter