This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Provides lifetime management for background services, ensuring proper cleanup and termination. | |
/// </summary> | |
/// <remarks>This is context aware and will only activate if it detects the host is not a web application.</remarks> | |
/// <param name="lifetime">The application lifetime manager.</param> | |
/// <param name="scopeFactory">The factory for creating service scopes.</param> | |
public class BackgroundServiceLifetime(IHostApplicationLifetime lifetime, IServiceScopeFactory scopeFactory) : BackgroundService | |
{ | |
private readonly IHostApplicationLifetime _lifetime = lifetime; // Application lifetime manager. | |
private readonly IServiceScopeFactory _scopeFactory = scopeFactory; // Factory for creating service scopes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Sudomemo Utilities | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Provide extra features to the sudomemo.net website! | |
// @author Alexandre QUONIOU | |
// @match https://*.sudomemo.net/watch/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=sudomemo.net | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js | |
// @grant GM_addStyle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' standalone='yes'?> | |
<PLUGIN version="2021.10.17.1"> | |
<!-- | |
A simple plugin to add sslh to unraid | |
--> | |
<FILE Name="/boot/packages/glibc-2.33_multilib-x86_64-4alien.txz" Run="upgradepkg --install-new"> | |
<URL>https://slackware.uk/people/alien/multilib/current/glibc-2.33_multilib-x86_64-4alien.txz</URL> | |
</FILE> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' standalone='yes'?> | |
<PLUGIN> | |
<!-- | |
A simple plugin to add tmux to unraid | |
--> | |
<FILE Name="/boot/packages/libevent-2.1.12-x86_64-3.txz" Run="upgradepkg --install-new"> | |
<URL>http://slackware.cs.utah.edu/pub/slackware/slackware64-15.0/slackware64/l/libevent-2.1.12-x86_64-3.txz</URL> | |
</FILE> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// This file is licensed under the terms of the Simple Non Code License (SNCL) 2.3.0. | |
// The full license text can be found in the file named License.txt. | |
// Written originally by Alexandre Quoniou in 2019. | |
// | |
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Runtime.InteropServices; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Concurrent; | |
using System.Threading; | |
using System.Threading.Tasks; | |
// ReSharper disable MethodSupportsCancellation | |
/// <summary> | |
/// Provides a way to debounce events. | |
/// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
/// <summary> | |
/// Provides the caller with means to remove and restore the current <see cref="SynchronizationContext"/> in an async method. | |
/// </summary> | |
public class SynchronizationContextRemover : INotifyCompletion | |
{ | |
private SynchronizationContextRemover() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel; | |
using System.Windows.Forms; | |
using System.Runtime.InteropServices; | |
class CueTextBox : TextBox | |
{ | |
private string _cue; | |
[Localizable(true)] |