##Preview
See images below
Simple Dashing widget (and associated job) to query an Icinga monitoring system and display the hosts and services status summary
Widget background colour is changes on the following priority :-
#Requires -Version 7 | |
# Version 1.2.13 | |
# check if newer version | |
$gistUrl = "https://api.github.com/gists/a208d2bd924691bae7ec7904cab0bd8e" | |
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version') | |
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)" | |
if ([System.IO.File]::Exists($latestVersionFile)) { |
##Preview
See images below
Simple Dashing widget (and associated job) to query an Icinga monitoring system and display the hosts and services status summary
Widget background colour is changes on the following priority :-
Description
This widget displays the current time as an analog clock
Usage:
In erb file:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
Dashing.io Widget for UnifiVideo NVR
This method uses API Key access so I suggest you setup a guest account with API access but limited (Visible and View Feed) access. Then login as the guest user, enable API access, and generate a new key. Copy the key for use.
Switch to the Devices tab and open the Configure dialog for the cam. On the Details tab, right-click the thumbnail view and Copy the image URL to the clipboard. It will look similar to the following if pasted to an address bar or text editor: http://192.168.1.105:7443//api/2.0/snapshot/camera/05a2bc63-d1ce-399f-8327-3a19b0cd3e8f?width=%d&force=true
The guid after /camera/ is what you want to use in the unifivideo.rb file.
You can setup as many cameras as you want, just keep adding settings.
<!doctype html> | |
<script> | |
if ("WebSocket" in window) { | |
var ws = new WebSocket("ws://127.0.0.1:31339"); | |
ws.onopen = function() { | |
console.log('connected'); | |
}; | |
ws.onerror = function(e) { |
Writing templates can be a pain. Securing it against cross-site scripting attacks can be even worse. Sick of writing htmlspecialchars($output, ENT_QUOTES)
again and again? And using htmlentities()
instead when escaping input for a JavaScript snippet? Why bother when there is a templating engine that can take care of all this dirty business?
Latte is a templating engine that comes shipped as a part of Nette framework, an open-source PHP framework of Czech origin. It is dual-licensed under New BSD and GNU GPL licenses. Latte automatically secures your templates against XSS exploits using context-aware escaping. And it makes writing templates a pleasure.
So, how do you output a variable in a secure way? Simply:
{$variable}
The MIT License (MIT)
Copyright (c) 2014 David Underwood
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: