Blog

  • I like a good crash, the one of Grosjean wasn’t a good one.

    (Please note all text below is my opinion, and written by an enthousiast, not someone who has understanding of all rules!)

    I like a good crash. A good crash for me is when the driver of drivers step out of their car and only need to go to a hospital for a checkup and then they are released. That last part is the maximum of what i like about a crash. A driver has to survive a crash!

    If you look at the crash of Thomas Laurent at the 6 hours of Spa this year, that’s a good crash. The car although totaled kept the driver save and Thomas could race a couple of weeks later at Le Mans. If you see him at the end of the clip, you notice that Thomas is responsive and without panic opens the door and he’s calm. I think he had a mandatory check because of the g-forces, but was otherwise ok.

    The other crash I think was a miracle no one was injured was the crash of Mike Harmon in the Nascar Bush Series in August 2002. During practice the right side of his car hit the barrier and ripped the car in half. Unfortunately when he spun back on the track Johnny Sauter couldn’t evade him and ran into the car. In the clip you can see Harmon in the car when Sauter hits him. The car makes a 270 degrees turn. Mike Harmon unbuckles his seatbelt, steps out of and then find out he also has to disconnect his communication cable. Both drivers walk away without serious injuries.

    Then why do i dislike the crash of Romain Grosjean? Well it has a couple of “issues” that i don’t really can explain, but i’ll try.

    I really can’t say that i have ever have seen the crash that costs Jules Bianchi his live. The reason is for me because i wasn’t a fan  of Jules Bianchi. But i’m not a fan of Romain Grosjean, so what makes the crash of RG so gut wrenching? I think it’s because it was live when i saw the crash happening, although RG was a back runner, the camera had a great view over the first straight and because of first round all cars were in the same shot, it wasn’t a replay or an accidental shot of his car running into the barrier.

    The other thing is that the barrier didn’t do his job properly (in my opinion). Only thanks to the Halo (until yesterday i disliked the thing, but got used to it) he survived. Why do i think the barrier didn’t do his job? Well to me i looked like the nose seemed to enter the barrier between two plates and so the monocoque was just a wedge that drove the the 2 panels away from each other. Thanks to the Halo the top plate didn’t stop when he reached to top of the nose but got pushed over the head of RG.

    Because of the nature of the crash (something you can’t tink of and thus cannot test) everything after the monocoque broke off and ripped the fuel cell in half. Only a little spark send everything in flames, a complete inferno. The monocoque slid just enough through so RG could exit his vehicle on his own power.

    One other thing I also found strange were the firefighters. Although they helped RG by fighting the fire and making somekind of path for him to escape, they just didn’t seem to be up for the task. The first firefighter on the scene cam from the Marshall post right after the crash. The firefighter only had a small powder extinguisher with him. That just wasn’t up for the task. But what was really strange when another firefighter came from the other side of the track with a more powerfull extinguisher and started to fight the flames. But because of the more powerfull device he blew a large amount of the flames to firefighter 1 (the one that started first) which i think wasn’t expecting that. Overall i think the firefighters that were at the scene first just weren’t up to the task.

    Of course there are a couple of people that need to be given a lot of appreciation.

    • Alan van der Merwe was the guy who helped RG get over the fence when he got out of the car. Although he was the closest to the fire he did everything in his power to help him.
    • Firefighters. Although in my above section i am a bit skeptical, they helped him to free up a path from where he could escape.
    • FIA. They did a great job over the years making F1 more safe. If this happend pre Halo i don’t think RG would have survived. But other things made the sport better. Think about the monocoque that needs to be of really high standards and what to think of the racing suits. The guys “sat” for 20 seconds in a great ball of fire and only has a couple of fire burns.
    • And this one maybe strange, but all the injured and unfortunately died racing drivers. Their accidents have had great impact on the safety of the sports

    I hope that RG will be racing very soon. In my opinion when you get to F1 you are a great racer, maybe not F1 material, but you know how to drive a car really fast, and i think if RG gets a seat where he really gets to show his potential, he is a force to be reckoned with. And hopefully the next crashes we will ever see is where the driver and everyone gets away safely and when the drivers gets asked what happened he can use the words of Mike Harmon: “Until the crash it was the best car i’ve ever driven.”

  • Is 1:64 the new 1:43?

    Is 1:64 the new 1:43?

    When i started collection about 20 years my first scale model was a 1/18 car of Jos Verstappen (dad of Max Verstappen). The detail of 1/18 were great and are still. The 1/43 were good and 1/64 were almost quality of toy cars. The details and quality were not that great. The last 5 years you can definitely see that the production process has gone up and therefore the quality has gone up. but you can see it over the complete line. 1/18 are even better then 20 years ago. The 1/43 have the quality of the 1:18 20 years ago.

    I now have a couple of 1/64 scales and there you can see the difference:
    Minichamps64 Hezemans PorscheThe first one is a Minichamps(64) made in 2010 of a 1976 Porsche driven by Toine Hezemans. You can see that the details are just a bit bulkier. If you look inside the rollbar really is really refined in the details. Nog that it’s a complete block of plastic, but it’s noticeable.

    Tarmac Nissan CoronelThe other car i have is a 1/64 scale from Tarmac and based upon a Nissan where one of the drivers was Tom Coronel. The detail is on all sides better, even the box (that’s even signed by Tom Coronel) has a nicer appearance.

    So in my opinion 1/64 is indeed the new 1/43. With the prices of 1/43 going up and the 1/18 will even cost you almost a kidney the 1/64 is a very good alternative to 1/43. In a my display case (an IKEA Bertby display case) where i normally can only display 1 1/18 and at best 6 1/43, i can display about 10 to 12  (or maybe even more) 1/64 scale models.

    You can be picky and say that the details for 1/43 and 1/18 are better and when you look at the overall quality, those are still better, but the prices are also higher. If you collect for the fun of collecting, 1/64 is a great way to expand your collection and not only have “toy” cars in you display cases.

  • Creating Database Diagrams in SQL Server Management Studio can make the application lock up

    Got a question today from a colleague. He had an application that could create a diagram for a database. This was an old program (last release in 2009) and it worked with Java. If i was able to install the application for an audit. My first thought was: “Why? SSMS is able to do this!”. So started SSMS and logged in to the SQL Instance, opened the database diagrams section and dumped all the tables in the canvas………

    And SSMS stopped responding. 15 minutes later everything went down the drain. The application didn’t respond at all. Had to restart the application. Went for a retry and just added 25 tables at a time and again same issue when i added the last set: SSMS stopped responding, after 15 minutes i had to kill the app…. 🙁 Tried a smaller set of 10 at a time, but it all seemed to lock up.

    The problem seemed to happen when a lot of tables were added and the app had to create the relationships between the new tables and then create the relationship between the nw tables and the old ones.

    Eventually found a solution: When in the screen where you can add the tables, select the first one and press add. That table is added and removed from the screen and the next new top one is selected , press add. Now SSMS only has to create the relations between the newly added table and the ones already on the canvas, so it’s less intensive. When you add al the tables like this and the screen is empty, you can close it and start working imediatly without lag or something.

  • Gmail “email+” account

    This week i found out that Gmail started supporting a function in their email system where you can use a + in your email account. The nice thing about it, is that you don’t have to create an additional email account.

    Your base email account (example Project34net@gmail.com) wil not change. but you can add a + and extra information: Project34net+google@gmail.com. When you send a mail to project34net+google@gmail.com, the mail will be delivered at your regular email address.

    This has a couple of advantages:

    • You can create a temporary account and after that you create an automatic delete filter in Gmail for deleting the mails for that email account.
    • You can create an email account for a specific website and when you start receiving mail from another domain you know there is something fishy about it.
    • You can create an email account when you know (and accept) that the mail address is shared between domains, but then you can create a filter to move the mails to a special folder.
    • You can create multiple mail addresses to create separate accounts for the same domain, so you can test stuff for when you are admin and wen you are a normal user.

    Although it works great, when a spammer finds you “gmail +” account, he/she can change your account pretty fast to it’s base mail account. If you take our example mail address: Project34net+google@gmail.com, if you replace the +google@ part of the mail account with only @ you get project34net@gmail.com and then you have your base email account again and the spammer can mail you and you have no meaning of knowing where they got your mail address from, or have a way to filter it.

    Apparently when you add dot to your email address (the part before the @ sign) you can get the same result. You get an unique mail address that you can use to filter on. Project34.net@gmail.com will deliver the mail also at project34net@gmail.com.

    The + trick also works for the following domains:
    @hotmail.com
    @outlook.com
    @live.com

  • Ping with timestamp

    I’m having issues with my internet connection lately. My modem seems to reset it self from time to time. It can work days without issues and then it starts to reset a couple of times without any warning.

    The internet provider sees nothing wrong with the modem. A mechanic needs to come by, but until then i want to be able to monitor the device.

    I’ve installed LibreNMS to monitor my connection. Every 5 minutes it checks by sending a ping to the router and another test is to ping 8.8.8.8 (one of the dns servers of google). It works like a charm. But sometimes the modem is restarted within 5 minutes. When i’m behind my PC i’ve started to run the ping command, and that works fine, only one thing annoyed me: I can’t see when the ping command tries to send an ping to the devices.

    Thanks to the blog of: https://www.raymond.cc/blog/timestamp-ping-with-hrping/, i’m running a ping command preceded with a time stamp:
    Ping From PowerShell:

    Ping.exe -t 192.168.178.1 | ForEach {“{0} – {1}” -f (Get-Date),$_}
    Ping.exe -t 8.8.8.8 | ForEach {“{0} – {1}” -f (Get-Date),$_}
    

    With this you get something like this:

    1/10/2020 8:51:05 PM – Reply from 8.8.8.8: bytes=32 time=19ms TTL=55
    1/10/2020 8:51:06 PM – Reply from 8.8.8.8: bytes=32 time=11ms TTL=55
    1/10/2020 8:51:07 PM – Reply from 8.8.8.8: bytes=32 time=12ms TTL=55
    1/10/2020 8:51:08 PM – Reply from 8.8.8.8: bytes=32 time=12ms TTL=55
    1/10/2020 8:51:09 PM – Reply from 8.8.8.8: bytes=32 time=21ms TTL=55
    1/10/2020 8:51:10 PM – Reply from 8.8.8.8: bytes=32 time=28ms TTL=55
    1/10/2020 8:51:11 PM – Reply from 8.8.8.8: bytes=32 time=11ms TTL=55

    That works like a charm!!

  • Retrieve FQDN from IP numbers in Nginx access log

    I wanted to write a script for expanding my Python knowledge. I ussually create small scripts to accommodate my “problems” or wishes.

    If you want use it:

    import socket
    
    FQDN = []
    ACC = []
    
    ACC_FILE = open('/var/log/nginx/access.log')
    for LINE in ACC_FILE:
            ACC.append(LINE.split(' ')[0])
    
    ACC.sort()
    ACC = set(ACC)
    for LINE in ACC:
            ADDR = socket.getfqdn(LINE)
            FQDN.append(ADDR)
    
    FQDN.sort()
    for SERVER in FQDN:
            print(SERVER)
    
  • Thanks to my birthday gift i created my first python script

    A couple of weeks back was my birthday and although i don’t really celebrate, my daughter wanted to get me a gift. Because we’ve gotten a new second hand car with an old tape deck that doesn’t support aux or something, i saw a so-called FM Transmitter. This is a device you place in you cigarette lighter in the car and you can connect a phone (over Bluetooth or AUX cable) or a simple USB stick. The AUX connection is crap! A lot of noise, but the BT and USB connection are oké. Main thing that i found as a disadvantage is that when you play music over the USB stick the music isn’t random. If you don’t like an album, you have to skip through al the songs of the album and hope you get a nice record after going through.

    To solve this (and to learn the Python scripting language) i’ve created the next script:

    import os
    from shutil import copyfile
    from random import randint
    import pathlib
    
    MP3_FOLDER=r'Source  folder'
    DEST_FOLDER = 'Destination Folder'
    FileCount = 1
    for root,dirs,files in os.walk(MP3_FOLDER):
        for file in files:
            if file.endswith('.mp3'):
                print(FileCount)
                FileCount = FileCount + 1
                rndFolder = DEST_FOLDER+str(randint(100, 999))
                rndFile = randint(10000, 99999)
                pathlib.Path(rndFolder).mkdir(parents=True, exist_ok=True)
                srcfile = os.path.join(root,file)
                dstfile = rndFolder+'\\'+str(rndFile)+'.mp3'
                copyfile(srcfile,dstfile)</pre>

    It scans the source folder and for every file that ends with ‘.mp3’ it generates a random number between 100 and 999, and creates a folder of it. Then it generates a random number between 10000 and 99999 and makes a file out of it with the extension ‘.mp3’. In my situation there are 5000+ mp3 files, so there will be a descent amount of directories, with different filenames in them. When the files are done, i can copy them from the destination folder to my USB stick. Of course the destination folder can already be the USB stick.

    If you are interested in the FM Transmitter, search for ‘BC06’. This is a very generic FM transmitter. I think you can buy them in China and sell them under your own brand. I’ve seen them from MFEEL, Kebidumei, Kebidu etc etc etc.

  • Print MSSQL TSQL output immediately

    Sometimes when you make a SQL script, that loops through a lot of records, you want to print a status. When you do this using print (or select), this will only display the content when the buffer is full. To immidiatly print everything to the screen use:

    RAISERROR ('here', 0, 1) WITH NOWAIT

    This will flush the buffers to screen and so you will see the output immediately.

  • MongoDB Restore

    This weekend our standby had issues with our backup shares, and mainly with the backups from MongoDB. These weren’t compressed or something. When we started using MongoDB we were at version 3.0, so compression (–gzip) wasn’t implemented yet. Now we are at version 3.2, compression is possible so we started implementing it. Because we wanted to test the backup AND restore. Backup wasn’t really an issue, changed the script and added –gzip and executed it.

    Restoring was another issue. When starting the command it gave the error “Failed: no reachable servers”. Strang thing was connecting to the server using the mongo command didn’t give an error. After searching a bit i found that removing the parameter “–replSet” should fix the issue. After removing the setting in the service (we are running MongoDB under Windows) and restarting the service, issues were solved. The restore went fine. After the test i added the parameter again and restarted the service.

  • OSMC 2018.X with Spotweb

    After a while it was time to reinstall my Raspberry pi OSMC installation. The installation was corrupt after some testing with different pieces of software. Well it was time to do a new installation.

    After a while i found out that OSMC had upgraded to PHP version 7, while Spotweb was only working with PHP version 5. So what to do? The default installations work great when you have a default PHP version 5, search on the internet, combine a couple of guides so you can “upgrade” to PHP 5. And to let people also have fun with Spotweb, here is the guide.

    First update everything to the latest version:
    apt-get update && apt-get dist-upgrade

    Add the following line to your /etc/apt/sources.list:
    deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
    Back on the command line execute:
    wget -q -O – http://mirrordirector.raspbian.org/raspbian.public.key |apt-key add
    After that do an:
    apt-get update && apt-get dist-upgrade
    If everything is ok, nothing will be updated.

    Now install php5, mysql client and apache2:
    apt-get install php5-mysql php5 apache2 php5-curl php5-gd php5-gmp 
    (Please note, mysql (mariadb in fact) is running on another server)
    Accept the changes by pressing: and press enter.

    You probably get an error, that’s because OSMC has a server running on the same webport. Let’s change that:
    nano /etc/apache2/sites-enabled/000-default.conf
    The first line ends with *:80, change this to *:8080 and save it (CTRL+X -> y -> Enter)
    Then we need to edit the ports file from apache:
    nano /etc/apache2/ports.conf
    change the line that states Lines 80 and change it to Lines 8080 and save it (CTRL+X -> y -> Enter).

    Now we can start apache2:
    /etc/init.d/apache2 start
    Try to connect to the website using the ip-address with the portnumber added:

    192.168.178.123:8080

    (ip-address can change to your setup) If everything went as planned you have a website.

    Now we configure PHP:
    We’ve got to change the timezone:

    sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Amsterdam/" /etc/php5/*/php.ini

    (Change the timezone to your own, this is my timezone)

    The next part is a bit difficult, because as i said, my database is running on another server, and that part is already installed. look at: https://github.com/spotweb/spotweb/wiki/Install-Spotweb-on-Ubuntu-12.04-LTS-(Precise-Pangolin)-(english) for the configuration, part of this post is also comming from there btw.

    Based upon the other website, i hope you have configured the SQL part.

    Now you have 2 options, installing spotweb using apt-get, but i wouldn’t recommend it. The version of spotweb on the repository is of 2013 and although spotweb from github isn’t actively maintained anymore, it’s still more recent then using apt-get.

    To install spotweb using github do the following:

    wget https://github.com/spotweb/spotweb/tarball/master
    tar -xvzf master
    sudo mv spotweb-spotweb-* /var/www/html/spotweb
    rm master
    cd /var/www/html/spotweb
    mkdir cache
    chown www-data:www-data * -R

    Now we can connect to spotweb using the website:

    192.168.178.123:8080/spotweb/install.php

    On the first page everything should be fine, the only options that maybe need some attention are:
    Database support: At least one of the database components should give OK, the others can be “NOT OK”.
    Own settings file: i don’t really make a custom settings file, so that can stay as “NOT OK”.
    Click “Next”

    The database components need to be changed to accomodate your settings. Like i said my database is on another server, so i changed the settings to the other server. When done, click verufy database and if everything is done correctly, you continue.

    Then enter the information of your usenet provider. You can select a set of preconfigured usenet providers or ad a custom one (last item of the pulldown menu). When done click verify.

    In the next menu you select what type of spotweb enviroment you want. In my case I checked “Single User” and added my info and clicked create system.

    If everything goes ok you will get a new screen that gives you the content of your dbsettings.inc.php. If you are using a program to make a connection to your server, you can copy paste the content. In the worst case you need to type it.

    cd /var/www/html/spotweb
    nano dbsettings.inc.php
    <copy paste the website content>
    CTRL+X -> Y -> ENTER

    While you are in a shell also do the following:

    cd bin
    php upgrade-db.php
    php upgrade-db.php
    

    (Yes run the last line twice. An index wasn’t created, so running it twice fixed that issue)
    Then switch back to your website and click on the link “Visit your spotwebsite”

    DONE!!

     

     

     

     

    Used resources:
    https://github.com/spotweb/spotweb/wiki/Install-Spotweb-on-Ubuntu-12.04-LTS-(Precise-Pangolin)-(english)