Monday, April 22, 2013

Installing the magic 4; Debian, Transmission, SickBeard, and Plex (part 1)

The next series of posts will be about creating your own fully automated Debian tv-show download-and-watch-everywhere center. I've got it all running on the same server as shown in Battle of the languages.

Part 1: Installation of Debian and Transmission
Part 2: Installation of Sickbeard and Plex
Part 3: Configuration

Download the appropiate netinst from http://www.debian.org/distrib/netinst. In our case we will be downloading the amd64 version (to create this tutorial I use a clean install on VMware). If you use a netbook you probably need the i386 version.
Install Debian with nothing selected except the standard system utilities, we only want the console (but if you want, you can always install the desktop environment).


Next-next-next through the setup and finish the installation till you're at the command prompt.

Now add your user to the super user group
$ su
$ apt-get install sudo
$ adduser <yourusername> sudo
$ exit
and install transmission:
$ sudo apt-get install transmission-daemon
$ sudo apt-get install vim
$ sudo vim /etc/transmission-daemon/settings.json
change the following settings (please note that this is not security best practice; use your router to prevent access to your machines from outside your lan):
"ratio-limit-enabled": true,
"rpc-authentication-required": false,
"rpc-whitelist-enabled": false,
and add the following 2 settings at the bottom (before the }) to add a watch directory:
"watch-dir": "/var/lib/transmission-daemon/torrents",
"watch-dir-enabled": true
The following step is to create the watch directory and reload the daemon
$ sudo mkdir /var/lib/transmission-daemon/torrents
$ sudo chown debian-transmission:debian-transmission /var/lib/transmission-daemon/torrents
$ sudo /etc/init.d/transmission-daemon reload
Once everything is done you can validate transmission with your browser by going to: http://<serverip>:9091/transmission/web/
to retrieve the ip of your server run: $ sudo ifconfig


Super easy! In the next post we will install sickbeard and plex!

Cheers,
Luuk

Monday, January 14, 2013

NancyFx on Mono and Nginx wiki is online!

This weekend I've completed my wiki entry for NancyFx on Mono and Nginx. You can check it out at https://github.com/NancyFx/Nancy/wiki/Hosting-Nancy-with-Nginx-on-Ubuntu.

I've tested it using Ubuntu on Hyper-V. For those who don't know, Hyper-V can be installed in Windows 8 pro in the Windows Features:


Once installed you get the Hyper-V manager in which you can create new virtual machines.


You can simply create snapshots in case you want to roll back your changes.

TIP: Create a snapshot on the clean install, so you can always return to that.

Now that the wiki page is done, I'll be focusing on the building-the-website part.

Cheers,
Luuk

Thursday, January 10, 2013

Battle of the languages (Python vs C#)

Some hard thinking last week: Will I build oswos.net in Python with Django, or build it in .NET.

Since I want to host the majority of my websites on my own server to save some money, I need something that works blazingly fast on a slow atom processor (9 watt Samsung NC10 netbook).



The first choice for me was to go with Windows 7 and IIS7, build websites in MVC4 and deploy them to the netbook. After building a new (rather simple) website, the warmup time was ridiculous (15+ seconds). So that isn't an option (my websites aren't that often visited so the site are kept in memory).

Then I looked into Python with Django, hosted on Debian with nginx. Blazingly fast (20ms for a request), the downside is I don't work with Python, but work for 8 hours a day in .NET, so it will take a lot of effort learning it, and at the same time miss the opportunity to get even better in .NET. Specialization is always better than globalization (in development, and in the general meaning of the word!), so my preference was doing something in .NET.

And then it happened: I follow my friends from NancyFx on Twitter for a while now, and about 2 weeks ago I saw them tweet about Mono (.NET for linux), so I wanted to try that. With A LOT of help from http://humblecoder.co.uk/blog/2012/01/07/hosting-nancy-on-debian-with-nginx/ I was able to build mono on my server (took more than 2 hours...) and run it on Debian. Results: Request take about 60ms. Wow!

So my conclusion is, do what you are best at, in my case .NET and make it as fast as possible. In the upcoming week I'll be helping NancyFx with making a tutorial running Nancy on Mono. Once completed, I'll send an update here.

Another thing I wanted to share; I got push notifications working on Android, really simple, look at GCM :-)


Follow me on twitter for faster updates and if you have any questions, or comments.

Take care,
Luuk

Tuesday, January 1, 2013

Oswos.net

Some of you may already have seen Oswos, my (not all too bad) attempt to create a simple webserver for a netbook. Now the performance is nothing compared to Nginx on a Debian server. But I've learned a lot during the development of this.


One thing that came to my mind while working on Oswos was the interest for server management. I wanted Oswos to contain an easy to maintain server management tool. But was far to busy getting bugs out of the webserver. That's why I descided to build some simple open source tools and applications to help you maintain your server and keep your sites up and running.

The first tool I'm building is an IP Monitoring tool. Why? Because I host a couple of websites on my dynamic IP webserver and want to be notified when the IP address changes so I can update the DNS.

This project contains 2 parts:
1. A simple python script which you can install on your server. This script poll's every x minutes if the IP has changed and pushes a message to your phone.
2. A simple Android application which receives the push notifications from the python script and displays the notification.

The android application is almost ready for deployment on GitHub, the Python scripts need an implementation of the push service for Android. Once the prototype is working, I'll give an update on this blog. After that I'll be focussing on the simple deployment and installation of this (and other) scripts.
I'm really curious about what you think of this idea, maybe have some input, or want to help set this "brand for server tools" up.

Also check out the new layout of www.luuk.it and tell me if you like it.

Best wishes and have a creative, meaningfull 2013 by doing the stuff you love.

Luuk

Wednesday, November 21, 2012

Tfs Work Item HtmlFieldControl height on sharepoint

During my investigation to create a customer friendly interface for Tfs Work Items, we've found an interesting 'hidden' feature: the Height attribute. Without it, the HtmlFieldControl take up a huuuuuuuuuge amount of space:


But by adding the super secret nowhere to be found Height attribute, magic happens...


*badadum*

<Tab Label="Issue Details">
  <Group>
    <Column PercentWidth="100">
      <Control FieldName="WhatWentWrong" Type="HtmlFieldControl" Label="What went wrong:" LabelPosition="Top" Height="75" />
    </Column>
  </Group>
  <Group>
    <Column PercentWidth="100">
      <Control FieldName="ReproduceSteps" Type="HtmlFieldControl" Label="Steps to reproduce the problem:" LabelPosition="Top" Height="75" />
    </Column>
  </Group>
  <Group>
    <Column PercentWidth="100">
      <Control FieldName="ExpectedBehavior" Type="HtmlFieldControl" Label="What is the expected behavior:" LabelPosition="Top" Height="75" />
    </Column>
  </Group>
</Tab>
By the way, to prevent the Html controls, make te type of the field PlainText.

Cheers!

Thursday, November 8, 2012

SSDT Script not found and update button disabled

SSTD is an awesome tool for comparing databases and updating them. Allthough it has some performance problems with the Object Definitions window open, it is still cool.

Yesterday I had some annoying problems with it. The first one I encountered was a message called 'Script not found':





It was caused by the .refactorlog in the project. After deleting the file the errormessage was gone.

But now what... the update and script buttons are disabled... lets click compare again and again. Nothing enables it. After some testing it was caused by a compile error which was solved with the compare window open. Lesson learned: After solving the compile error, you'll have to close the schema compare window and open a fresh one. Now they are enabled again.

Saturday, October 6, 2012

Export and import a large set of resx resources (part 2)

Finally I had some time to build the import of the ResourceExtractor code. Allthough this wasn't that hard to complete, I've been very busy with moving to my new house and getting settled.

Now you can simply extract resx files to xls, and merge them back to resx (you can even use this with the prebuild command). All the usage options can be found in the help (by running the executable without any arguments).

Off cource, all of this goodness can be found at https://github.com/luuksommers/resourceextractor Beware it is build in VS2012! And once you'll get used to the color scheme you'll love it!

If you have questions or comments please leave them below!
Cheers,
L