Skip to content

Instantly share code, notes, and snippets.

@bluewalk
bluewalk / DateTimeLogger.cs
Last active October 10, 2019 12:03
DateTimeLogger: ILogger with DateTime stamp for .NET Core projects
/// <summary>
/// DateTimeLogger
/// </summary>
/// <typeparam name="T"></typeparam>
/// <inheritdoc />
public class DateTimeLogger<T> : ILogger<T>
{
private readonly ILogger _logger;
/// <inheritdoc />
@bluewalk
bluewalk / install-git-completion.sh
Created April 29, 2019 17:51 — forked from johngibb/install-git-completion.sh
Mac OS X - Install Git Completion
URL="https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash"
PROFILE="$HOME/.profile"
echo "Downloading git-completion..."
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
fi
@bluewalk
bluewalk / TaskScheduler.cs
Last active November 2, 2020 12:27
Simple C# class for task scheduling
/// <summary>
/// Task scheduler
/// </summary>
public class TaskScheduler
{
private readonly ILogger _logger;
private readonly List<Timer> _timers = new List<Timer>();
public TaskScheduler(ILogger<TaskScheduler> logger)
{
@bluewalk
bluewalk / pihole-spotify.txt
Created December 28, 2017 09:37
Spotify Pi-Hole
media-match.com
adclick.g.doublecklick.net
googleads.g.doubleclick.net
www.googleadservices.com
pagead2.googlesyndication.com
desktop.spotify.com
pubads.g.doubleclick.net
audio2.spotify.com
crashdump.spotify.com
adeventtracker.spotify.com