Skip to content

Instantly share code, notes, and snippets.

@nicdnepr
nicdnepr / redis-stats.php
Last active Jun 26, 2017 — forked from blongden/redis-stats.php
Single page website to show statistics on a redis server
View redis-stats.php
<?php
$fp = fsockopen('127.0.0.1', 6379, $errno, $errstr, 30);
$data = array();
if (!$fp) {
die($errstr);
} else {
fwrite($fp, "INFO\r\nQUIT\r\n");
while (!feof($fp)) {
View export.sh
#!/bin/bash
USER="zend"
PASSWORD=""
#OUTPUT="/Users/rabino/DBs"
#rm "$OUTPUTDIR/*gz" > /dev/null 2>&1
databases=`mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database`
View firebase-messaging-sw.js
importScripts('https://www.gstatic.com/firebasejs/4.3.0/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/4.3.0/firebase-messaging.js');
firebase.initializeApp({
messagingSenderId: ''
});
const messaging = firebase.messaging();
self.addEventListener('notificationclick', function(event) {