Over the last 8 years the demand to scale has ever increased.

We have gone from curating machines like your favorite pets, and started spinning up, and destroying VM’s at an ever increasing pace.

As engineers the Unix like platforms, have always been easier to work with. Personally I enjoy linux, I love package managers, I love ssh, and configurations are much easier. That being said, lately I have been interacting a lot with Windows servers.
Continue reading

So a while back I made a website that uses the Excel interop (long story). Since I made it a while ago, the IIS configuration is not automated, and must be done artisanally.

Recently I have been working on moving it to a new server. I installed Excel, and the website.
Continue reading

Getting started with anti-forgery tokens in NancyFX with razor views is pretty simple.

To start you need to enable csrf in application startup.

1
2
3
4
5
6

protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
{
Csrf.Enable(pipelines);
base.ApplicationStartup(container, pipelines);
}

Now you need to create a token on the get request that returns the form

1
2
3
4
5
6
7
8
9


Get["/"] = x =>
{
this.CreateNewCsrfToken();
return View["Index"];
};

<!-- more -->

Now in your view you need to render the token

1
2
3
4
5
6
7
8
9

<form method="POST">
Username <input type="text" name="Username" />
<br />
Password <input name="Password" type="password" />
<br />
<input type="submit" value="Login" />
@Html.AntiForgeryToken()
</form>

Finally you need to authenticate the token on the post request

1
2
3
4
5
6
7
8
9
10
11
12
Post["/"] = x =>
{
try
{
this.ValidateCsrfToken();
}
catch (CsrfValidationException)
{
return Response.AsText("Csrf Token not valid.").WithStatusCode(403);
}
//do something
};

Comment and share

Code quality tooling has become a bigger, and bigger industry. Tools like Resharper, and stylecop have been telling us how bad us human beings are at developing code.

The one problem I have always had with these tools is they dont go above and beyond to help you understand your code at a higher level.

Continue reading

I am here in lovely Portland Oregon attending Monitorama. Monitorama is a 3 day open source monitoring convention.

Monitorama had catered food, and drink. The food was plentiful and delicious, and the drinks were amazing.

There were 10 talks, I have made a quick summarization below. I don’t have time to write in detail about each one, but I am sure you will get the gist from the basic summary.
Continue reading

Tommy "TerribleDev" Parnell

Hi, my name is Tommy. I work very hard to deliver quality content, free. If I helped you please consider donating.


Software Engineer II


Boston Area