Lucian

Welcome to my blog patch

Here you will find whatever, in blog post format.

Follow my dev related stuff here:

And a cooking / poorly written recipes here:

Recent posts

  • Posted on

    Time: 00:30:00

    Ingredients: - Pumpkin

    Slice into long strips Grill pumpkin second tray

  • Posted on

    Time: 00:34:00

    Ingredients: - Pastry - Jam or something

  • Posted on

    Time: 00:30:00

    Ingredients:

    Set oven to 220c

  • Posted on

    The refresh button , was something rarely used but with the birth of mobile smart phone computing, refreshing is commonplace your; emails, messages, rss feeds, facebook posts, youtube subs, the list goes on.

    Refreshing helps you physically get hooked on the pretense that something might popup. This compulsive action may start effect your hands, possibly pathing the way to RSI. No seriously how often do you see yourself or others in the train refreshing?

    If that doesn't convince you ask yourself this:

    If apps run in the background periodically, checking if new stuff is available. Why are you doing something that a script already is doing for you?

    Here is an RSS reader I have edited to include no refresh button:

  • Posted on

    Choosing between apache2 and nginx for a good webDAV server, I noticed an error if I included a BCrypted password in the htpasswd file.

    Looking further nginx seems to use the password function crypt(), TLDR; OpenSUSE seems to be the only one to support BCrypt on crypt() and thus on nginx.

    Here's a C program to test crypt() with MD5, SHA512 & BCrypt:

    #include <stdio.h>
    #include <crypt.h>
    
    int main(void) {
        char *hashed;
        char *cryptorandsalt[3];
        char *cryptname[3];
    
        cryptorandsalt[0] = "$1$salthere";
        cryptname[0] = "MD5";
        cryptorandsalt[1] = "$6$salthere";
        cryptname[1] = "SHA512";
        cryptorandsalt[2] = "$2a$salthere";
        cryptname[2] = "bcrypt";
    
        int i;
        for( i = 0; i < 3; i = i + 1 ){
            hashed = crypt("xyz", cryptorandsalt[i]);
            printf("%s: %s\n", cryptname[i], hashed);
            // puts(hashed);
        }
        return 0;
    }