My Blog

Sharing programming insights since 2015. 160 articles (and counting!) filled with real-world experience and practical tips.

    How to create a less function (mixin) and use it for implementing beautiful and customized CSS box-shadows

    Less supports the creation of pseudo-functions that can be used as CSS-classes in your less files. Doing this way you can save multiple keystrokes, automate your stylings and avoid syntax errors.

    Lets take a look at a function that automates the creation of CSS box-shadows and supports new browsers by making use of browser prefixes.

    Read the complete article

    How to exclude a file from TFS source safe in Visual Studio?

    Often you want to include a file into one of your Visual Studio projects, but you do not want to check it in TFS. Such files can be for example .css files generated from sass or less files or JavaScript files created automatically after TypeScript files are compiled.

    Visual Studio provides a way to perform this task. Unfortunately it is not as easy as it sounds…

    Read the complete article

    How to fix the "duplicate identifier" error in TypeScript

    When working with TypeScript, there is a big chance that you will have to deal with a “duplicate identifier” error sooner or later.

    But what exactly this error means? Read the error text again. Duplicate identifier. You are defining, with other words referencing, the same identifier (class, method, property) twice in your code.

    Read the complete article

    Ever wondered how the null coalescing operator || works in JavaScript?

    For those who are wondering what exactly the null coalescing operator is, consider the following example:

    var a = null;
    var b = a || 10;
    console.log(b); // It will log 10
    

    It is very probably that you already used such code in your programs. In the previous example, with the || operator we are practically set the number 10 to variable b, if the value inside variable a is null.

    Read the complete article

    How to fix the "Invalid tag value. This XML tag has an invalid value. Please fix it and resubmit." error when using the jekyll-sitemap gem.

    After I installed the jekyll-sitemap gem on my Jekyll website and tried to register the generated sitemap in my Google webmaster account, I received from Google the following error:

    Invalid tag value. This XML tag has an invalid value. Please fix it and resubmit.

    Read the complete article