Continue your download when internet connection breaks down

It’s been a long time since I last used a really unstable internet connection. Currently my home internet speed is quicker and more stable that the one on my current job.

Here is the situation that I found myself in.
Because all the people at my job share a 15/15 Megabit per second up/down link the internet is really slow and breaks all the time. I won’t even go into why do I have to open up a VPN on a local network that should be trusted.
From time to time the VPN tunnel or internet connection just dies on you. Leaving you with with a partially downloaded file. For an example Visual Studio 2015 .iso image.

You must be thinking? Well it’s 2016 and internet connections should be quicker and faster if you work in IT company. Well, guess what… that’s not the case here.

Solution is to use wget command line tool. I got mine via portable apps directory. Once downloaded and ‘installed’ you will find the binary that you need in \WinWGetPortable\App\winwget\wget\ folder. Copy it in your download folder for quick later use. Open up command line and position yourself in the download folder. We are going to use two switches. One is -c, it tells the wget to continue from where it left (if the server permits it). Other is –limit-rate=xyz, it limits the download speed.

wget http://domain.com/path_to_the_file -c –limit-rate=xyz

More about the switches can be found listing the help via command line, or in online manual.

How to setup InfluxDB, Chronograf and Telegraf for development

InfluxDB, Chronograf and Telegraf are part of TICK stack from InfluxData.

To install it on Ubuntu you could use apt-get package manager, or install it via .deb package. I prefer the second method.

You can find install instructions on their download page.

After installation there are two config files you have to change a little to make things work.

First one is located in /opt/chronograf/ under name ‘config.toml’. Inside you have to expose Chronograf to public internet (see picture).

ChronografConfig

Second one is located in /etc/telegraf/ under name ‘telegraf.conf’. My advice would to first to comment everything you don’t need, and then uncomment stuff you need. In my case I needed Generic TCP listener (see picture).

TelegrafConfig

After that all you need is to start the required daemons in usual manner.

sudo service influxdb start
sudo service telegraf start
sudo service chronograf start

Chronograf is accessible via port :10000 (http://127.0.0.1:10000)

After opening Chronograf web interface you will have to setup InfluxDB server. Picture below should be sufficient for you to complete that task.

ChronografInfluxDBSetup

You are done. Now all that is left is to start filling InfluxDB time-series DB with some data, and visualize it on Chronograf interface.

How to setup Ubuntu on Hyper-V machine

First we are going to download new Ubuntu image.

Lets see what are recommended system requirements.

  • 2 GHz dual core processor or better
  • 2 GB system memory
  • 25 GB of free hard drive space
  • Either a DVD drive or a USB port for the installer media
  • Internet access is helpful

Open a Hyper-V manager and create a new Virtual machine with above requirements.

UbuntuHyperVSettings

Be sure to disable Secure Boot option if you choose to use 2nd generation of virtual machine.

How to Install NUnit testing Framework and Visual Studio Test Adapter

GitHub project I’m currently playing around with required NUnit testing framework.
At first I have installed latest and the greatest version 3.2.1.
Tried to run the tests, nothing happened.
Hmmmm, what was I missing? I’m always missing something.
After poking around the project I soon realized 3.2.1 was not the right version.
Written tests were not running because they were written for version 2.6.4.
After additional installation and setting up of test adapters for visual studio everything worked.

TestExplorer

One test that’s failing is of course written by me. It’s a smoke test for TCP implementation I’m working on.

All the needed links are below.

NUnit testing Framework
http://www.nunit.org/index.php?p=download

NUnit Test Adapter for Visual Studio Test Adapter
https://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d
https://visualstudiogallery.msdn.microsoft.com/0da0f6bd-9bb6-4ae3-87a8-537788622f2d

How to enable .net 2.0 on windows 10

A few day ago I ran into a interesting issue.
I needed .net 2.0 on Windows 10 machine.

Yeah, I know… welcome to the year 2016.

Lucky the issue is resolved easily.
Search for “Turn Windows features on or off” or look it up in Control panel.

WindowsFeatures

There you will find “.NET Framework 3.5 (includes .NET 2.0 and 3.0)”.
Just check it and click OK.
The system will do the rest for you.