Skip to content

Instantly share code, notes, and snippets.

View Jandev's full-sized avatar

Jan de Vries Jandev

View GitHub Profile
@NatLee
NatLee / restart_docker.sh
Last active October 18, 2024 03:44
Synology DSM 7.x - A way to restart service of docker
# Use new Synology CLI tool -> `synopkgctl`
#usage: synopkgctl <command> [...]
#command:
# enable <package>
# disable <package>
# setup <package>
# start <package>
# stop <package>
# teardown <package>
@alanta
alanta / AlwaysOn.cs
Created May 14, 2020 09:15
Azure Web Apps with Always On enabled poll your web app every 5 minutes. If there's nothing listening on that url this results in a 404 response which shows up as an error in monitoring.
public static class AlwaysOn
{
/// <summary>
/// Prevent 404 on the application root URL. Azure Web Apps with Always On enabled invoke the root of the application every 5 minutes
/// to keep your web app awake. If you run an API-only app you likely have nothing listening to /, which results in a 404 response
/// that shows up in monitoring. This endpoint returns 200 with content Ok only for the always on check.
/// </summary>
/// <param name="builder">The application builder.</param>
/// <returns>The application builder.</returns>
public static IApplicationBuilder UseAlwaysOn(this IApplicationBuilder builder)