Blog Spot!


Limit swap wear

Linux's inclination to use the swap, is determined by a setting. The lower the setting number, the more system load is required before your Linux starts using the swap.

On a scale of 0-100, the default setting is 60. Which is much too high for normal desktop use, and only fit for servers. For SSD's, it's just crazy.

A detailed explanation can be found here (link dead? Then download this PDF file with the same content).

Now the how-to:

a. Check your current swappiness setting. Type in the terminal (use copy/paste):

cat /proc/sys/vm/swappiness

Press Enter.

The result will probably be 60.

b. Now type in the terminal (use copy/paste):

sudo xed /etc/sysctl.conf

Press Enter.

c. Add the following blue lines, at the very end of the existing text in that file (use copy/paste to avoid errors):

# Sharply reduce the inclination to swap
vm.swappiness=1

d. Save the file and close it. -> reboot

Taken from section Limit swap wear in here

Added on 27.Apr.2018
Tags: linux swap swappiness

Usefull CSS loaders

Added on 17.Apr.2018
Tags: css load loader partials

How To Create An Animated Scroll To Top Button With jQuery

article

The HTML

<a href="#" class="scrollToTop">Scroll To Top</a>

The CSS

.scrollToTop{
    width:100px; 
    height:130px;
    padding:10px; 
    text-align:center; 
    background: whiteSmoke;
    font-weight: bold;
    color: #444;
    text-decoration: none;
    position:fixed;
    top:75px;
    right:40px;
    display:none;
    background: url('arrow_up.png') no-repeat 0px 20px;
}
.scrollToTop:hover{
    text-decoration:none;
}

And of course finally the Javascript/jQuery

$(document).ready(function(){

    //Check to see if the window is top if not then display button
    $(window).scroll(function(){
        if ($(this).scrollTop() > 100) {
            $('.scrollToTop').fadeIn();
        } else {
            $('.scrollToTop').fadeOut();
        }
    });

    //Click event to scroll to top
    $('.scrollToTop').click(function(){
        $('html, body').animate({scrollTop : 0},800);
        return false;
    });

});

Added on 13.Apr.2018
Tags: to top js jquery scroll top

Speed Distance Time Calculators

Speed = Distance ÷ Time

Time = Distance ÷ Speed

Distance = Speed × Time

web-calc

Added on 02.Apr.2018
Tags: speed distance time calculation math

Set server to universal time - UTC

sudo timedatectl set-timezone Etc/UTC

Added on 22.Mar.2018
Tags: timezone server utc tz linux

Search


PHP Libraries


Carbon lib / docs
Idiorm lib / docs
Image Workshop lib / docs
lorenzos/Minixed lib / docs
Parsedown lib / docs
PHP Paginator lib / docs
PHP Redis lib / docs
QrCode lib / docs
Requests lib / docs
Slim lib / docs
Spyc lib / docs
TWIG lib / docs
Upload lib / docs
Validation lib / docs
Zebra Image lib / docs

JS Libraries


AJV lib / docs
BackboneJS lib / docs
Bootstrap Notify lib / docs
C3.js lib / docs
ChartJS lib / docs
FastMD5 lib / docs
HighlightJS lib / docs
jQuery-Storage lib / docs
JS-Cookie lib / docs
Leaflet JS lib / docs
LowDB lib / docs
Marked lib / docs
NeedlyJS lib / docs
ParcelJS lib / docs
RequireJS lib / docs
Swig lib / docs
Toastr lib / docs
Underscore lib / docs
ValidateJS lib / docs
top