This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import axios from "axios"; | |
| import jwt from "jsonwebtoken" | |
| import UrlPattern from 'url-pattern'; | |
| import qs from 'query-string'; | |
| // jwt generator | |
| const privateKey = `-----BEGIN EC PRIVATE KEY----- | |
| MHcCAQEEIF7u6fQ1RaVV7YUg+dOD0j6upkFJ1fNQZ4nzz8n0m1zboAoGCCqGSM49 | |
| AwEHoUQDQgAEuG6npq0n2HHW+kKK2x2RfMh0J/AzwJeXgUKuMvzC2aXoKZyTLNf+ | |
| TNX1cfH+h+aMkOhenIabeiHsjdiHzX/n54lM/g== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| ## How to install mcrypt in php7.2 / php7.3 | |
| ## Linux / MacOS / OSX | |
| ## | |
| ## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/ | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Requires jQuery of course. | |
| $(document).ready(function() { | |
| $('.show-comments').on('click', function(){ | |
| var disqus_shortname = 'YOUR-DISQUS-USERNAME'; // Replace this value with *your* username. | |
| // ajax request to load the disqus javascript | |
| $.ajax({ | |
| type: "GET", | |
| url: "http://" + disqus_shortname + ".disqus.com/embed.js", | |
| dataType: "script", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* sans-serif */ | |
| font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; | |
| font-family: Helvetica, "Helvetica Neue", Arial, sans-serif; | |
| font-family: Verdana, Geneva, Tahoma, sans-serif; | |
| font-family: Trebuchet, Tahoma, Arial, sans-serif; | |
| font-family: GillSans, Calibri, Trebuchet, sans-serif; | |
| font-family: "DejaVu Sans", "Bitstream Vera Sans", "Segoe UI", "Lucida Grande", Verdana, Tahoma, Arial, sans-serif; | |
| font-family: Geneva, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", Verdana, sans-serif; | |
| font-family: Geneva, Verdana, "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif; | |
| font-family: "HelveticaNeue-Roman", "Helvetica 55 Roman", Helvetica, Arial, sans-serif; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin linear-gradient($fromColor, $toColor) { | |
| background-color: $toColor; /* Fallback Color */ | |
| background-image: -webkit-gradient(linear, left top, left bottom, from($fromColor), to($toColor)); /* Saf4+, Chrome */ | |
| background-image: -webkit-linear-gradient(top, $fromColor, $toColor); /* Chrome 10+, Saf5.1+, iOS 5+ */ | |
| background-image: -moz-linear-gradient(top, $fromColor, $toColor); /* FF3.6 */ | |
| background-image: -ms-linear-gradient(top, $fromColor, $toColor); /* IE10 */ | |
| background-image: -o-linear-gradient(top, $fromColor, $toColor); /* Opera 11.10+ */ | |
| background-image: linear-gradient(top, $fromColor, $toColor); | |
| filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='$fromColor', EndColorStr='$toColor'); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @mixin transition($transition-property, $transition-time, $method) { | |
| -webkit-transition: $transition-property $transition-time $method; | |
| -moz-transition: $transition-property $transition-time $method; | |
| -ms-transition: $transition-property $transition-time $method; | |
| -o-transition: $transition-property $transition-time $method; | |
| transition: $transition-property $transition-time $method; | |
| } | |
| /* Usage - Stick into the top of your SCSS sheet and @include where needed for cross browser transitions. | |
| .class { |

