Blog Spot!


How to change permissions only to files

How to change permissions only to files, not directories....?

find . -type f -exec chmod 644 {} \;

source

Added on 16.Jul.2015
Tags: linux permissions cli

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

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