Optimize your website with a few linux command line tools

When optimizing your website you will notice that images, and static resources are the most delaying the load of your website. You can use numerous tool to optimize them on the fly and cache them in WordPress or Joomla cache. I personally prefer to optimize them for once and save them on the disk.

The latter is requiring some access to the Linux command line and is therefore reserved for the most tech oriented people. I am presenting here some tools: Guetzli and PNGQuant, uglifyJS but there are more available. At this point of time these tools are the best in their category.

Optimizing JPEG files

Guetzli is a Google JPEG encoder that aims for excellent compression density at high visual quality. Guetzli-generated images are typically 20-30% smaller than images of equivalent quality generated by libjpeg. Guetzli generates only sequential (non progressive) JPEG due to faster decompression speeds they offer.

Install it

apt install guetzli # linux
brew install guetzli # macos
# windows user should use binary releases https://github.com/google/guetzli/releases

It is recommended to always do a backup of the folder containing your images, just in case. (real men don’t do backup but they often cries). I run Guetzli recursively in all sub-folder using find

find . -type f -name "*.jpg" -exec guetzli {} {} \;

Optimizing PNG files

pngquant is a command-line utility and a library for lossy compression of PNG images. The conversion reduces file sizes significantly (often as much as 70%) and preserves full alpha transparency. Generated images are compatible with all web browsers and operating systems.

apt install pngquant # linux
wget https://pngquant.org/pngquant.tar.bz2 # macos
# windows user should use binary releases https://pngquant.org/pngquant-windows.zip

I use the same technique, running pngquant recursively in all sub-folder using find

find . -iname "*.png" -exec pngquant -f -ext .png --verbose {} {} \;

Optimizing JavaScript files

Warning: i do not recommend to optimize official files of WordPress or Joomla. Some build int scanner that checksum internal file may detect this changes as a security breach: new code checksum do not match official WordPress expect checksum anymore.
It can be use for plugins and your own custom JavaScript code through.

UglifyJS is a general-purpose JavaScript parser/compressor/beautifier toolkit. 

find . -maxdepth 1 -iname "*.js" -exec uglifyjs --compress --mangle -o {} -- {} \;

Init7 TV7 and VLC under windows 10

You can watch channels using any software or device as long as it supports multicast. Such as VLC on a computer. A VLC playlist with all TV7 channels and the multicast addresses is provided for this under the following link:

You have the following options:

  1. You open the URL directly from within VLC (Open -> Network and then paste the URL from the above link), so you always have the latest updated channel list.
  2. Download the file to your computer and open it in VLC.
  3. Download the file to your computer and open it in a text editor to search for the respective multicast addresses of channels to use with another box or program that does not support XSPF playlists.

Note that the multicast addresses of individual channels and the channel line-up may change. so it is recommend to use option 1.

Unfortunately this was not working for me at all, I use VMWare and Virtual Box, and both software define custom network adapter…

somehow vm network adapter do not set properly the automatic metric. The fix is to change the IPv4 metric to 1 on the physical ethernet (or wireless if needed) and leave the other to automatic.

Useful links

Tiny-RSS update in background using SystemD

Before you can start using tt-rss properly, you have to tell him to update your feeds!  Here is the complete how to do it with SystemD

Systemd is an init system used in Linux distributions to bootstrap the user space. Subsequently to booting, it is used to manage system processes. It is a replacement for the UNIX System V and Berkeley Software Distribution (BSD) init systems. The goal is unification of basic Linux configurations and service behaviors across all distributions

Create a new file /lib/systemd/system/ttrss_backend.service

with content

[Unit]
Description=ttrss_backend
After=network.target mysql.service postgresql.service

[Service]
User=www-data
ExecStart=/home/waltercedric.com/subdomains/rss/update_daemon2.php

[Install]
WantedBy=multi-user.target

 And then run 

systemctl enable ttrss_backend.service
service ttrss_backend start

You can use journalctl -u ttrss_backend to look through daemon console output.

How to install your own open source Mind Map tool in html5

Thanks to https://github.com/drichard/mindmaps you can host your own copy of Mind Map like I did at

http://mindmap.waltercedric.com/index.html

image

Node.js is a platform built on Chrome’s #JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

and npm is the package manager for the Node #JavaScript platform.  It puts modules in place so that node can find them, and manages dependency
conflicts intelligently. It is extremely configurable to support a wide variety of use cases. Most commonly, it is used to publish, discover, install, and develop node programs. (https://npmjs.org/)

Continue reading How to install your own open source Mind Map tool in html5

Roads Kill interactive map

image

The global road death toll has already reached 1.24 million per year and is on course to triple to 3.6 million per year by 2030. In the developing world, where this pandemic has hit hardest, it will become the fifth leading cause of death, leapfrogging past HIV/AIDS, malaria, tuberculosis and other familiar killers, according to the World Health Organization’s (WHO) most recent Global Burden of Disease study. This Interactive map use open source mapping technology from Mapbox.

France

  • 6.4 deaths per 100,000 people
  • Car 56.7%
  • Motorcycle 23.9%
  • Bicycle 3.7%
  • Walking 12.2%^
  • Other: 3.6%

Causes: Speed, Helmet, Seat Belt and Alcohol
Source: interactive map of crash data from the Pulitzer Center

Ninite: Install multiple application at once

With The release of Windows 7, you may face the issue that you have to reinstall a huge number of applications (time consuming and annoying). This is where Ninite, may help you installing your favorite apps again in no time.

Visit Ninite site and pick the software apps you want to install and click “Get Installer” at the bottom of the page.

ninite.screenshots

Ninite runs on Windows XP/Vista/7 and works in the background 100% hands-free. Best of all, It is completely free for personal use!

Online tool for webmaster: usability, performance, SEO

SEO

This is an instant, free and no-registration tool to analyze the SEO performance of a URI for a given key phrase. Reports include a variety of useful information and structured recommendations to improve overall effectiveness. Try a few reports and judge for yourself. The tool aims to encourage the use of standards compliant, user-friendly and accessible code while at the same time helping website-owners to attract more visitors to their websites. Of course, no automated tool can substitute for a human analysis by an experienced search engine optimizer.

The Reaction Engine_ a Free Online SEO Analysis Tool 

Continue reading Online tool for webmaster: usability, performance, SEO

ne soyez pas dupe, histoire d’une arnaque sur leboncoin.fr

L’histoire

je trouve une personne qui vend un “Boîtier Nikon D700+70-300mm+24-120mm+GP-1 GPS” le tout pour 1300 euro à Nanterre sur www.leboncoin.fr. Trop beau pour être vrai car le prix de cet ensemble est d’approximativement:

  • Nikon D700+24-120mm = 3280 €
  • 70-300mm = 415 €
  • GP-1 GPS = 150 €

Contact

Je contacte cette personne Laurent <lrntb4@gmail.com> … et voila sa réponse:

Bonjour,
Je vous remercie de votre intérêt dans mon annonce. Si vous êtes intéressé à faire un achat rapide, le prix est 1300euros. Maintenant pour le début, je vous expliquerai comment faire cette transaction. J’ai l’article également affiché sur ebay.fr et je préfère faire la transaction à travers ebay, pour plus de sécurité.Ainsi, si vous êtes vraiment intéressé à faire cette affaire, tout que vous devez faire est de m’envoyer exactement ces détails :
Pseudo eBay:
Nom:
Prenom:
Adresse:
Ville:
Code Postale:

Une fois que j’aurai ces informations, je les passerai à eBay avec mes informations. Bientôt,vous serez contacté par eBay avec de prochaines instructions sur cet achat. Je fais cette transaction par eBay parce que je veux éviter tous les problèmes. Merci.

Ce qui DOIT vous choquer

  • Des erreurs de français, des tournures de phrases fausses (en rouge) tout le texte est de tournure maladroite…
  • Un mensonge, en bleu, l’object après verifications sur www.ebay.fr n’est pas en ligne,
  • L’attente d’une indiscrétion de votre part (en vert), il vous demande de révéler quelque chose sur vous: votre pseudo ebay, votre adresse. La j’avoue que je ne sait pas encore pourquoi et dans quel but. Je pense que le voleur va essayer de voler votre mot de passe ebay en les contactant par email, et se servir de votre compte pour des vols ultérieur sur ebay.. Si quelqu’un a une idée de la raison de cette demande pour le moins bizarre, qu’il me contacte ou laisse un commentaire ci dessous.
  • Taper l’email: lrntb4@gmail.com dans Google, une autre personne qui a été dupé peut apparaitre.
  • Le PRIX, 1300 euro, 1/4 du prix du neuf, ce qui est anormalement bas. Acheter quelque chose à vil prix, ne peut se justifier devant la justice: cela peut constituer du recel et pas comme vous le pensez une bonne affaire (sic).

Le recel est le fait de dissimuler, de détenir ou de transmettre une chose, ou de faire office d’intermédiaire afin de la transmettre, en sachant que cette chose provient d’un crime ou d’un délit.  Constitue également un recel le fait, en connaissance de cause, de bénéficier, par tout moyen, du produit d’un crime ou d’un délit. Le recel est puni de cinq ans d’emprisonnement et de 375000 euros  d’amende.

Ma réponse

Fictive pour tester le vendeur, le nom est faux,  l’adresse du commissariat a été trouvée sur Google maps. Idéalement il ne vaut mieux pas répondre!

Bonsoir,
J’ai une meilleure idee:  j’ai a Nanterre un ami policier:
Mr Meyer Christian il travaille au commissariat de police, Rue du 19 Mars 1962. Vous vous y rendez, il VERIFIE l’appareil et vous règle 1300 euros
Qu’en pensez vous?

Pas de réponse bien sur, et l’annonce à déja disparue sur le www.boncoin.fr

Votre meilleur défense contre les voleurs reste VOTRE bon sens!