Hints for Securing Ubuntu on a VPS

Digital Ocean and Godaddy Pro are nice VPS providers. However, it’s important to update the security of any box you create ASAP. It took under 24 hours for one of my boxes to be hacked and turned into a DoS! Therefore, when you create your box, make sure to add a firewall immediately. Add an SSH …

Getting a C# Server Working with Dokku and Vagrant

Developing a self-hosted web server in C# to run on Linux is like solo climbing a mountain: not a lot of people will be accompanying you; and the route will be unmarked, unmaintained, and often dangerous. In the digital world, there are two groups of programmers: people who use Node.js, Java, Ruby, etc. hosted on …

Self-hosting a C# Nancy Server on Linux

Sinatra is a popular and wonderful web application framework that has spawned a number of copycat frameworks. You can write large websites or REST servers with it. While it is a framework only for Ruby, there are alternatives for other languages, Spark Java for Java, Lavarel for PHP, etc. For C#, Nancy is the choice, and …

Getting C# on Friggin’ Linux Working

If you like C#, and want to program using it across all platforms–including Linux–it’s easy using the Mono runtime! The details of the Mono project I won’t go into detail here, but rather only show how to set up a “Hello world!” project that will build and run on Ubuntu. Note: MonoProject is an IDE for …

Getting SSH/Git Clients on Friggin’ Windows Working

  Secure Shell (SSH) is a network protocol used ubiquitously, e.g., github.com, bitbucket.com, etc. If you use Git or Hg, it’s nice to set up SSH because you can avoid having to re-enter your user id and password every time you clone the repository. (Or, if you are really desperate, encode the user id and password …

A Short, Practical Review of Foreign Function Calls in Java, C#, C++

Android is a popular platform for smartphones, with ten of thousands of applications developed for it every year. For coding an Android app, there are a number of programming languages, but Java is the most popular. However, Xamarin provides tools for writing applications in C# if you prefer. If you use Xamarin, but sometimes want to …

An OpenCL.NET Program for Device Information

There was an interesting question on Gamedev.net today asking about whether there is an API in C# for querying information about the GPUs installed. Apparently, GPU-Z uses the CUDA API to get information about an NVIDIA GPU, and GPUPerfAPI for the AMD GPU. However, a good alternative to those APIs is OpenCL, a platform independent framework to …

Synchronization Using Barrier for Tasks in the .NET Task Parallel Library

Lately I have been converting some GPGPU algorithms from CUDA into C# and the Task Parallel Library, e.g., tiled reduction. However, I noticed a significant problem in the efficiency of the System.Threading.Barrier class for task synchronization. This problem was also noted by Andrea Esuli here, who proposed an incomplete solution. As stated in the documentation, “[Barrier] enables multiple tasks …

Windows 10 on VirtualBox

The Windows 10 preview has been out for several months, but it still doesn’t work well in VirtualBox: the VirtualBox graphics driver crashes with “Windows cannot initialize the device driver for this hardware. (Code 37)” or “Windows has stopped this device because it has reported problems. (Code 43)”. This means you cannot use “auto-resize Guest Display”. …