Skip to content

Instantly share code, notes, and snippets.

@mkerstner
mkerstner / php-curl-http-status-code-checker.php
Created February 4, 2019 11:50
Simple PHP cURL HTTP status code checker
<?php
/**
* Tests and sets HTTP Header status code based on the response from the
* $urlToTest.
*
* Optionally waits $maxTimeout seconds and uses $defaultStatusCode in
* order to overwrite status code from $urlToTest. In addition, optionally
* $printStatusCode to response.
*
@mkerstner
mkerstner / nextcloud-webdav-client.php
Created February 11, 2019 23:39
Wrapper for the NextCloud WebDAV API using sabre/webdav.
<?php
use Sabre\DAV\Client;
include 'vendor/autoload.php';
/**
* NextCloud WebDAV client. Abstraction layer that uses sabre/webdav for the
* actual WebDAV communication.
*
#!/bin/bash
#
# Simple script to determine the disk usage in percent for a given source path.
# Optionally uses disk usage to run additional web service call for further
# processing.
# Specify the minimum usage percentage to trigger the alert.
#
# @version 1.0.0
# @author Matthias Kerstner <matthias@kerstner.at>
###############################################################################