Optimize linux battery life

Ubuntu/Debian : sudo apt install tlp

to start it : sudo tlp start

to show stat : sudo tlp stat

Long time no see wordpress ! been busy lately.

Ruby spaceship operator <=>

The spaceship operator is general comparison operator. The <=> operator compares 2 values and returning -1, 0, or 1 depending on whether the first value is less than, equal, or greater than the second.

Example in irb.

This operator is used on ruby range operation , objects must implement <=> and succ method to perform range operation. Lets test the a numeric value for these methods.

Keep learning ruby on 2021.