Best way to install Node.js and NPM

Node.js strongly recommend using a Node version manager like n to install Node.js and npm. They do not recommend using a Node installer, since the Node installation process installs npm in a directory with local permissions and can cause permissions errors when you run npm packages globally.

Install n directly from Github:

curl -L https://bit.ly/n-install | bash

Then check your versions (remember than node comes with npm)

node --version && npm --version

Note: if you are already having problems, first remove everything related with Node.js and NPM

Resize a bunch of images at the same time using a Bash loop

You can take advantage of Bash and ImageMagick to quickly do processing of many images.

for file in *.jpg; do convert $file -resize 1000 resized-$file; done

But it could be even easier using the command mogrify from the same library:

HOW TO RESIZE MULTIPLE IMAGES AT ONCE

HTML range value

Shortest version without form, min or external JavaScript.

Forcing the domain to serve securely using HTTPS (for any site)

Is your WordPress site shown as No Secure Connection? Solve this easily forcing any http request to be rewritten using https. Just copy and paste the code below into your .htaccess file exactly as shown.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Header always set Content-Security-Policy: upgrade-insecure-requests

Fusion Dance – HTML5 and CSS3

I’ve had this Goku fusion idea between HTML & CSS in mind for a while but I couldn’t find the time to draw it till now. Many web developers grow in ego once they know some JavaScript tricks but a real front-end engineer is not really good until he/she masters HTML and CSS as well. Never underestimate HTML and CSS!