Blog Spot!


Setting the MySQL root user password

$ mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='root';
mysql> flush privileges;
mysql> quit

stackoverflow

Added on 16.Jul.2015
Tags: mysql password cli

How to implement desktop notifications in your website

document.addEventListener('DOMContentLoaded', function () {
    //check if the browser supports notifications
    if (!("Notification" in window)) {
        // do nothing 
        // This browser does not support desktop notifications
        return;
    }
    if (Notification.permission !== "granted"){
        // if permission is not granted then ask user for permission
        Notification.requestPermission();
    } else {
        // user has given permission
        createNotificaiton('Success.', null, 'Desktop notifications are now allowed!');
    }
});
function createNotificaiton(theTitle, theIcon, theBody) {
    var options = {
      icon: theIcon,
      body: theBody,
    };
    var notification = new Notification(theTitle, options); 

    //close the notification automatically after 5 seconds
    setTimeout(notification.close.bind(notification), 5000); 

    //attach events here
    notification.onclick = function () {
        //on clicking set focus to browser tab that triggered notification
        window.self.focus();
    };
}
createNotificaiton('The END is near.', 'http://prikachi.com/images/987/8219987P.jpg', 'Tour days are numbered!');

full article

Added on 08.Jul.2015
Tags: js desktop notifications popup

Heroku Cloud, Quick Start

Heroku Cloud

Login to Heroku Service

$ heroku login

Clone your repository

$ heroku git:clone -a donvercety

Commit to Service

$ git push heroku master

Heroku nodejs

Start local server

$ foreman start web

Initiate new Server (new Procfile)

NodeJS
web: node app.js
PHP ( web/ is the public folder )
web: vendor/bin/heroku-php-apache2 web/

Added on 07.Jul.2015
Tags: heroku cloud nodejs php

Android adb, set up device for development: no permissions

Best answer:

What works for me is to kill and start the adb server again. On linux: sudo adb kill-server and then sudo adb start-server. Then it will detect nearly every device out of the box.

stackoverflow

Added on 06.Jul.2015
Tags: android adb terminal

How to check hard disk performance - Linux Terminal

hdparm is a good place to start.

sudo hdparm -Tt /dev/sda

/dev/sda:
Timing cached reads:   12540 MB in  2.00 seconds = 6277.67 MB/sec
Timing buffered disk reads: 234 MB in  3.00 seconds =  77.98 MB/sec

sudo hdparm -v /dev/sda will give information as well.

dd will give you information on write speed. If the drive doesn't have a file system use of=/dev/sda. Otherwise, mount it on /tmp and write then delete the test output file.

dd if=/dev/zero of=/tmp/output bs=8k count=10k; rm -f /tmp/output

10240+0 records in
10240+0 records out
83886080 bytes (84 MB) copied, 1.08009 s, 77.7 MB/s

askubuntu

Added on 03.Jul.2015
Tags: hdd performance linux terminal

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