Author:

Client side routing explained
javascript

Client side routing explained

Client side routing explained React router is the defacto standard for client side routing in React SPA application. To understand how React router works ( and other type of client side routing libraries), first, we need to understand how client side router works. Server side routing On a server side web

davide
Use face-api.js on node js
tensorflow

Use face-api.js on node js

Face-api.js is a great library that uses tensorflowjs to do face recognition, face detection, face landmarks, and other stuff with faces... The problem is that is complicated, the code is complicated, the examples are complicated and the documentation is complicated. The dude writing here likes simple things, he is

davide
javascript

ASCIICAM

Simple webapp that turns your webcam into ASCII art. code is available on github at https://github.com/david1983/ascii_cam I've done this in 2015 when I realised that I did not know JS enough ... so it is done in vanilla JS, without any libraries and using

davide

Javascript game in less then 1kb

Code golf winner of the js1k2010 c=document.getElementById("c");h=t=150;L=w=c.width=800;u=D=50;H=[];R=Math.random;for($ in C=c.getContext('2d'))C[$[J=X=Y=0]+($[6]||'')]=C[$];setInterval("if(D)for(x=

davide
Hadoop-spark-kafka-zookeeper docker compose
spark

Hadoop-spark-kafka-zookeeper docker compose

Docker compose is awesome, especially if you need to spin up your local development environment. the following is the docker-compose I use at home. version: '2.1' services: zoo1: image: zookeeper:3.4.9 restart: unless-stopped hostname: zoo1 ports: - "2181:2181" environment: ZOO_MY_ID:

davide
Not an Hotdog

Not an Hotdog

I love the silicon valley tv series. and lately I've been doing some machine learning and deep learning studies, so what's the most famous image classification problem of the silicon valley series? Obviously Jin Yang's not an hotdog The following is the Keras model

davide
Backslash and pipe on a US keyboard set as UK
keyboard

Backslash and pipe on a US keyboard set as UK

This is for anyone in the UK, stuck with a US layout keyboard!!! Recently I bought a cheap mechanical keyboard from the US, even though the layout US-UK is fairly similar, some keys are in a different position, like the # and some others are missing (¦|). Today I needed to type

davide

Fast line count

The following is a simple bash script used to calculate the number of lines in ginormous text files ( like 20G CSV). #!/bin/bash # get the line count of a file without reading the entire file # accuracy can be adjusted by changing the $linenum parameter path=$1 linenum=$2 head=$(head

davide
DAGs visualization using dagre-3d

DAGs visualization using dagre-3d

Directed Acyclic Graphs are directed graphs, that have a topological ordering, a sequence of the vertices such that every edge is directed from earlier to later in the sequence. DAGs are often used in ETL processes to define pipelines for ingestion/transform of files and lately as a replacement of

davide
Sleep-sort in javascript

Sleep-sort in javascript

Sleep sort is a joke sorting algorithm. Sleep sort spawns off one process for each argument. Each process waits for n milliseconds, then prints out n, meaning it takes 1 millisecond to print out "1", 2 millisecond to print out "2", 100 millisecond to print out

davide