Skip to content

Instantly share code, notes, and snippets.

View hawlik's full-sized avatar

Tomek hawlik

  • Poland
View GitHub Profile
@hawlik
hawlik / serwice-worker.js
Created January 4, 2017 23:00
service worker redirect to browser tab on push notification click event
//browser push notification "onClick" event heandler
self.addEventListener('notificationclick', function(event) {
console.log('[Service Worker] Notification click Received.');
event.notification.close();
/**
* if exists open browser tab with matching url just set focus to it,
* otherwise open new tab/window with sw root scope url
*/
event.waitUntil(clients.matchAll({
@hawlik
hawlik / wildfly-install.sh
Last active August 27, 2015 20:03 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 9.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 9.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :20150726
#usage :/bin/bash wildfly-install.sh
WILDFLY_VERSION=9.0.1.Final
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION
(function () {
var dateTimeController = function ($scope, $rootScope) {
$scope.vm = {
message: "Bootstrap DateTimePicker Directive",
dateTime: {}
};
$scope.$watch('change', function(){
console.log($scope.vm.dateTime);
});