Skip to content

Instantly share code, notes, and snippets.

View felixlindemann's full-sized avatar

Felix Lindemann felixlindemann

  • Lime-Tree
  • Wuppertal, Germany
View GitHub Profile
<prtg>
<result>
<channel>First channel</channel>
<value>10</value>
</result>
<result>
<channel>Second channel</channel>
<value>20</value>
</result>
</prtg>
@felixlindemann
felixlindemann / prtg-sophos-licenses.ps1
Last active November 12, 2021 13:09
PRTG-Custom Sensor for Sophos UTM Licenses (SG-SERIES)
### 2019-08-13 ###
<# .SYNOPSIS Reset of VPN-Tunnel per Powershel.
.DESCRIPTION SOPHOS-API is used to read the status of licences
.NOTES Change the APi-Token from time to time in sophos.
API Token can be added at https:// + $IP + :4444/ --> Verwaltung --> Webdamin --> Restfull API --> Token
.COMPONENT to avoid certificate issues, certificate warnings are ignroed. #>
param(
[Parameter(Mandatory=$true)]
rsync -rtXx --numeric-ids --progress -e "ssh -T -c aes128-ctr -o Compression=no -x" <user>@<ip>:/<source-path>/ /<dest.path>/
@felixlindemann
felixlindemann / olMap.Demo.js
Created May 10, 2016 10:09
altered version of the olMap.Demo.js
var map;
var highlightStyleCache = {};
$('#btnAddDemo').click(function (evt) {
evt.preventDefault();
olMapControls.Layers.ReadGpx("gpx/track.gpx", "Bycycle Tour Wuppertal 100km", "id_gpx100km");
addHoverSupport();
$(this).parent().remove();
});
@felixlindemann
felixlindemann / triangular.R
Created April 16, 2016 19:46
triangular Distribution: Implementation for R
### https://de.wikipedia.org/wiki/Dreiecksverteilung
dtriangular <- function(x,a,c,b){
if(a>=b){stop("a must be smaller than b")}
if(a>=c){stop("a must be smaller than c")}
if(c>=b){stop("c must be smaller than b")}
if(length(x) >1){
d <- NULL
for(i in 1:length(x)){
d<- c(d, dtriangular(x[i],a,c,b))
@felixlindemann
felixlindemann / clsTime.cs
Created February 25, 2016 21:23
c# get Time from PTB Server
using System;
using System.Text;
using System.Net.Sockets;
public class clsTime
{
public static System.DateTime GetNISTTime()
test
@felixlindemann
felixlindemann / changeLanguage.vb
Created March 27, 2015 08:09
Change default language of Powerpoint 2010
Sub ChangeProofingLanguageToEnglish()
Dim j, k As Integer
Dim languageID As MsoLanguageID
'Set this to your preferred language
languageID = msoLanguageIDEnglishUK
For j = 1 To ActivePresentation.Slides.Count
For k = 1 To ActivePresentation.Slides(j).Shapes.Count
ChangeAllSubShapes ActivePresentation.Slides(j).Shapes(k), _
@felixlindemann
felixlindemann / olMap.Demo.js
Last active August 29, 2015 14:17
olMap.Demo.js
$('#btnAddDemo').click(function (evt) {
evt.preventDefault();
addCustomLayer();
$(this).parent().remove();
});
function addCustomLayer(){
function AddButtonToMapStyle(parent,index, value){
var isVisible = value.oTile.get('visible') == true;
var title = value.oTile.get('title') ;
$(parent).append('<li><a href="#" data-index="' + index + '">' + title + ' </a></li>');
$(parent + " li:last-child a").addClass('ol-inactive');
if(isVisible){
$(parent + " li:last-child a").removeClass('ol-inactive').addClass('ol-active');