ocppjs – An experimental OCPP Simulator

Simulator for the Open Charge Point Protocol — the protocol by which a Charge Point of an electric vehicle communicates with a Central System — supporting both OCPP-S (standard OCPP, using SOAP over HTTP) and the new OCPP-J (“new” OCPP, using a Wamp inspired protocol over WebSockets). Version 1.2 and 1.5 of OCPP are supported. …

Web Animations Polyfill

<div class=”pulse” style=”width:150px;”>Hello world!</div> <script> var elem = document.querySelector(‘.pulse’); var player = document.timeline.play(new Animation(elem, [ {opacity: “0.5”, transform: “scale(0.5)”}, {opacity: “1.0”, transform: “scale(1)”} ], { direction: “alternate”, duration: 0.5, iterations: Infinity })); </script> An emulator of the Web Animations specification. Please note that this is still experimental, and that the specification is likely to change …

HTML Barcode Scanner

window.addEventListener(‘load’, function() { barcode.config.start = 0.1; barcode.config.end = 0.9; barcode.config.video = ‘#barcodevideo’; barcode.config.canvas = ‘#barcodecanvas’; barcode.config.canvasg = ‘#barcodecanvasg’; barcode.setHandler(function(barcode) { document.getElementById(‘result’).innerHTML = barcode; }); barcode.init(); }); An HTML5 barcode scanner which scans EAN-13 barcodes using a webcam. HTML Barcode Scanner (GitHub) → Original repo was removed. Forked repos can be found below Did this help …

Tools for image optimization

Where possible, it’s best to try automating image optimization so that it’s a first-class citizen in your build chain. To help, I thought I’d share some of the tools I use for this. Not only contains a list of grunt plugins one can use, but also a few command line and online tools. I’ve been …

zxcvbn: realistic password strength estimation

Simplistic strength estimation gives bad advice. Without checking for common patterns, the practice of encouraging numbers and symbols means encouraging passwords that might only be slightly harder for a computer to crack, and yet frustratingly harder for a human to remember. zxcvbn, named after a crappy password, is a JavaScript password strength estimation library. Use …