Coloring white Images with CSS filter
Recently I had to change the color of a white image. Since this image was rendered by a library, which did not allow replacing it by another one, it had to be done with CSS. Although there is a relatively simple solution to it, it proved to be quite a challenge to come up with that.
Setting up a Reverse-Proxy with Nginx and docker-compose
Nginx is a great piece of software that allows you to easily wrap your application inside a reverse-proxy, which can then handle server-related aspects, like SSL and caching, completely transparent to the application behind it.
Hosting Asp.Net Core Applications on Windows Server Core
Recently, I've found myself in the position of having to host an application on Windows Server. Having never managed a Windows Server before, I struggled to find relevant information, especially since most of it is written for a Windows Server with installed UI, and the default image on Azure is a Core image, without UI. This is mostly documentation for myself, but maybe you find it helpful too.
Using Scripting to quickly execute repetitive Tasks
Sometimes I have to do a repetitive task for a project, that would take hours if done manually. Shell commands are normally the way to go, but I've always had a hard time learning them, and after I did, I forgot them quickly, because I need them very infrequently. So I found another solution.
The Bliss of Automating my Server Setup
I have a VPS, on which a few of my side-projects are hosted. Recently, I had to set it up a few times, because I made it unusable (please don't ask me how, it was really stupid).
Every time this happened, it took me hours to set it up again. Granted, I don't know much about maintaining a server, and you can probably do it a lot faster than me, but you can never be faster than a script. So, after the second time, I finally decided it is time to automate that process.
Building a Color Scheme Generator
After reading Practical Color Theory for People Who Code, I immediately thought that the process of generating the color scheme can be automated. This blogpost describes how it is done and how you can use it. The code can be found on Github.
Learning Gulp for Website Minification
Recently I developed a static website for a company, and as it gets closer to the release date, I try to do everything to satisfy Google PageSpeed Insights.
At first, as a C# developer, I thought about developing a small console application, which takes a folder and minifies all contents inside it. Then I remembered that there are task runners that do exactly that kind of thing. So this is a short summary of what I learned.
Immediate Font Fallback Rendering for Firefox and Webkit Browsers
Using custom fonts is easy, having excellent usability with them, sadly, is not. In this articles I'll explain the issues I encountered, and analyze the different ways to resolve them.
Cached IEnumerable Implementation
Recently I had a little discussion with a colleague about
IEnumerable and that it evaluates its entries each time it is enumerated. This peaked my interest, and I decided to implement a cached version.
There are many other implementations out there, some of them very similar to mine. It still seemed like a fun little project, so here it goes.
Implementing Soft-Delete in pure MySQL
Soft-delete, setting a deleted flag instead of actually deleting, is a great way to ensure the ability to recover accidentally deleted data by users for many applications.
Some technologies, like Ruby on Rails, have soft-delete baked in, so the developer doesn't have to do anything to use it.
Unfortunately, others don't have that, and for some it is quite difficult to integrate. I've tried it with Entity Framework 6. It worked, but wasn't nearly as clean as I hoped it would be.
So for the cases where its too much work to add soft-delete to the application, I've developed a MySQL script that adds it to the database, without having to change the application at all.
Keeping Canvas (or any other Element) from rendering outside its Bounds in UWP
Canvas is a panel that enables absolute layouting. It therefore renders its children, per default, even if they are outside of its dimensions, as indicated by the documentation:
The children of a Canvas (if any) are still visible even if the Canvas has any of these conditions:
● Height or Width property of the Canvas is 0.
Sometimes this is not the desired behavior. For example, if the canvas is not the only UI element in your application, it would be pretty annoying if its children would overlap the other (more important) elements (like menus, data display and so on).
Creating custom Shapes for UWP Apps
In WPF, creating custom shapes was as easy as extending
Shape and overriding
DefiningGeometry. In UWP, it isn't that easy.
Shape does not have a
DefiningGeometry property. But instead, the
Path class is not
sealed. This means it is possible to inherit from
Path. So this is what we'll do.
Ripple Effect in WPF
This article was sparked by a question on StackOverflow. At the beginning I thought that would be a trivial problem. Turns out it was a lot more difficult than expected.