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 {} -- {} \;

Fidelity Electronics Chess Challenger 10

The best technology for playing chess from year 1979!

The one picture above has the serial number 173357 and was bought in Zürich Switzerland.

There is 3 models available

  • A (07/1978) has 16 keys on the keyboard and for 1.d4 d5 2.c4 c6, will respond 3. Cc3
  • B (11/1978) has 16 keys on the keyboard and for 1.d4 d5 2.c4 c6, will respond 3. Cf3
  • C (05/1979) has only 12 keys and has an optimized software.
  • Model: Chess Challenger 10
  • Manufacturer: Fidelity International
  • Year: 1979
  • Estimated ELO rating: 1200
  • Levels of play:10
  • Processor: Z80A @4 MHz
  • Programmer: Ron C Nelson
  • Type: Keypad / Calculator with magnetic pieces
  • Dimensions:    33.3 x 21.4 x 2.9 cm.
  • Memory:    4 KB ROM, 0.5 KB RAM
  • AC – adapter connected directly to computer – non-removable
  • price: 450€

At the time, Fidelity was located in Chicago, IL, USA – 5244 W. Diversey Ave
The warranty was 90 days. After 90 days you had to ship the unit plus a $35 money order to them.

Fidelity chess computer

The manual indicated that the Chess Challenger could be upgraded after June 1, 1977 by sending the unit back to them and a money order for US$ 75.00

“…the game analyzes each position and, after considering all possible chess moves, makes a decision which is determined to be the best available move.
The sophisticated program used in this decision-making process is thoroughly tested, and each game manufactured acts like all other games. Thus, CHESS CHALLENGER cannot make a fundamental error.
Initially you may find that CHESS CHALLENGER may appear to be making an illegal move. However, this is highly unlikely.”

Fidelity Chess Challenger 10. Model CCX.  The manual indicates that level 7 is for postal chess (by mail) and the average response time is 24 hours!

Here’s a complete list of the levels of play with the average response time for A or B model, C being provided for reference in bold:

  • CL1 – Beginner –          5 Seconds (3 Seconds)
  • CL2 – Intermediate –     15 Seconds (10 Seconds)
  • CL3 – Experienced  –     35 Seconds (50 Seconds)
  • CL4 – Advanced –       1:20 minutes (1:20 minutes)
  • CL5 – Superior –       2:20 minutes (3 minutes)
  • CL6 – Mate in 2 –        60 minutes (6 minutes)
  • CL7 – Postal chess –     24 hours (12 minutes)
  • CL8 – Expert –           11 minutes (20 minutes)
  • CL9 – Excellent –         6 minutes (70 minutes)
  • CL10 – Tournament –       3 minute (15 minutes)

Key description

  • RE reset
  • switch sound off
  • CL clear
  • EN enter
  • LV level
  • DM double move
  • PB Problem
  • PV Verify

Here is the opening move of the model CC10 B

  • 1. e4 e5 2. Sf3 Sc6 3. Lc4 Lc5 4. c3 Sf6 5. d4 exd4 6. cxd4 Lb4+
  • 1. e4 e5 2. Sf3 Sc6 3. Lb5 a6 4. La4 Sf6
  • 1. e4 c5 2. Sf3 d6 3. d4 cxd4 4. Sxd4 Sf6 5. Sc3 g6 6. Le2 Lg7
  • 1. e4 e6 2. d4 d5 3. e5 c5
  • 1. e4 e6 2. d4 d5 3. Sc3 Sf6 4. Lg5 Le7 5. e5 Sfd7
  • 1. e4 e6 2. d4 d5 3. Sc3 Sf6 4. e5 Sfd7 5. any c5
  • 1. d4 d5 2. c4 e6 3. Sc3 Sf6 4. Lg5 Sbd7
  • 1. d4 d5 2. c4 c6 3. Sf3

Continuous build of Apache projects

Apache foundation is using Hudson for continuous build (and also JBOSS)

Hudson monitors executions of repeated jobs, such as building a software project or jobs run by cron.
Among those things, current Hudson focuses on the following two jobs:

  1. Building/testing software projects continuously, just like CruiseControl or DamageControl.
    In a nutshell, Hudson provides an easy-to-use so-called continuous integration system,
    making it easier for developers to integrate changes to the project, and making it easier
    for users to obtain a fresh build. The automated, continuous build increases the productivity.
  2. Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those
    that are run on a remote machine. For example, with cron, all you receive is regular e-mails that
    capture the output, and it is up to you to look at them diligently and notice when it broke.
    Hudson keeps those outputs and makes it easy for you to notice when something is wrong.

This is a public build and test server for various Apache Projects.

 

 

An #Eclipse plugin is also available the online WIKI is HERE

If you are shopping for a build server, and you are not on a budget, I can recommend you the
excellent Team City from JetBrains. #Maven integration is also good, but wont probably never reach the level
of Hudson as it is made by Apache and tailored for their frameworks needs.

What is Linux?

Robust, reliable memory-protected architecture;
Excellent throughput, with multiple options for RealTime response;
Fault isolation/management, limiting fatal errors to single (restartable) processes;
Availability of communication protocols, tools, and device-driver support;
Support for key CPU architectures; and Large, worldwide development community offering quality software.