Blog Spot!


How to Install Arch Linux

Arch Linux is a lightweight distribution of Linux, designed to be user-oriented as opposed to beginner-friendly. Arch's guiding principals are self-education and experimentation, and there is little to no hand-holding when using it. Installing Arch Linux is a bit more complex than some of the more "friendly" distributions, but it won't take as long as you might think.

wikihow

Added on 15.Sep.2015
Tags: linux terminal arch

How to stress a CPU with a bash command

Example to stress 2 cores for 60 seconds

stress --cpu 2 --timeout 60

stackoverflow

Added on 04.Sep.2015
Tags: linux termina cmd command stress

Split large string in n-size chunks in JavaScript

function chunkString(str, length) {
    return str.match(new RegExp('.{1,' + length + '}', 'g'));
}

fastest solution:

function chunkString(str, len) {
    var size = Math.ceil(str.length/len),
        ret  = new Array(size),
        offset, i;

    for (i = 0; i < size; i++) {
        offset  = i * len;
        ret[i] = str.substring(offset, offset + len);
    }

    return ret;
}

stackoverflow

Added on 24.Aug.2015
Tags: js split string array

Dynamically get form data with jQuery

Here is an example on how to make a dynamic data collection form HTML form.

$('form.ajax').on("submit", function() {

    // get form attributes
    var that = $(this),
        url  = that.attr('action'),
        type = that.attr('method'),
        data = {};

    // get all name attributes
    that.find('[name]').each(function(index, value) {

        var that  = $(this),
            name  = that.attr('name'),
            value = that.val();

        // append all values form the name attributes
        data[name] = value;

    });

    // do the ajax request
    $.ajax({

        url: url,
        type: type,
        data: data,
        success: function(response) {
            console.log(response);
        }

    });

    // prevents the default behavior for submit
    return false;

});

Added on 19.Aug.2015
Tags: jquery js form data

How to Install OpenJDK 8 in Ubuntu 14.04 & 12.04 LTS

sudo add-apt-repository ppa:openjdk-r/ppa

sudo apt-get update 
sudo apt-get install openjdk-8-jdk

sudo update-alternatives --config java
sudo update-alternatives --config javac

java -version

article

Added on 12.Aug.2015
Tags: java mint linux openjdk-8

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