Posts

Puck.JS Torch

Example of a (small) torch with Puck.JS var onoff = false; setWatch(function() {   console.log("Pressed");   setTimeout( () => {     onoff = !onoff;     if(onoff) {       digitalWrite([LED3,LED2,LED1], (111).toString(10));     } else {       digitalWrite([LED3,LED2,LED1], 0);     }   }, 1); }, BTN, {edge:"rising", debounce:50, repeat:true}); Explanation about (111).toString(10) This converts a binary number to a string. 111 says all three led lights should turn on. 1 (or 001) for red 10 (or 010) for green and 100 for blue 

How and why do I need to set a preferred domain?

By default a domain can be reached via four unique urls: http://example.com http:// www .example.com http s ://example.com http s :// www .example.com For search engines and visitors it can be unclear which one is the 'right' one. The result can be that users share http://-version on social media, Bing selects https://www-version as their preferred domain to index and Google prefers https://-version to index.  It is best practice to be crystal clear about the version you want to be the preferred version. Let's say https://www.example.com is the version we want to be the version to be crawled, indexed and ranked. Redirecting other versions to https://www.example.com On the server side you can redirect other version to your preferred versions with a 301 status code. All users and crawlers will be redirected to your preferred version. The result will be that only one version can be visited.  After you changed these settings on the server side, don't fo