Jan
03

magic tts code for console

var msg = new SpeechSynthesisUtterance(‘Hello World’);
window.speechSynthesis.speak(msg);

https://developers.google.com/web/updates/2014/01/Web-apps-that-talk-Introduction-to-the-Speech-Synthesis-API

Jan
03

Decode a famous website

Many news medien encode their paid text, but some of them has very simple encode mechanism. 😀

I wrote the following code to decode a famous webseite. 

Just copy following codes in the console, then, you will see the text.

JS Bin on jsbin.com

Guess, which medien? 😀

Have fun!

Jan
03

The easiest way to update nodejs and npm

Linux:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

Windows:

Methode 1:
1. Dowload and install the latest version of node.js
2. go the directory: C:\Program Files\nodejs
npm install -g npm@latest

Methode 2:
1. install chocolatey:
2. choco install nodejs (install node.js)
choco update nodejs (update node.js)
choco update npm

Methode 3:

Download the latest MSI from here, and run it