[alias]
gl = "!git log --graph --pretty=format:'[ %Cred%h%Creset | %Cblue%an%Creset | %Cgreen(%cr)%Creset ] ->%C(yellow)%d%Creset %s' --abbrev-commit --date=relative"
This file contains 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
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 |
This file contains 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
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 |
This file contains 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> | |
/// DateTimeLogger | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <inheritdoc /> | |
public class DateTimeLogger<T> : ILogger<T> | |
{ | |
private readonly ILogger _logger; | |
/// <inheritdoc /> |
This file contains 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
class Program | |
{ | |
// AutoResetEvent to signal when to exit the application. | |
private static readonly AutoResetEvent WaitHandle = new AutoResetEvent(false); | |
static async Task Main(string[] args) | |
{ | |
var version = FileVersionInfo.GetVersionInfo(typeof(Program).Assembly.Location).ProductVersion; | |
Console.WriteLine($"[APP] version {version}"); | |
Console.WriteLine("[GITHUB_LINK]\n"); |
This file contains 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> | |
/// Task scheduler | |
/// </summary> | |
public class TaskScheduler | |
{ | |
private readonly ILogger _logger; | |
private readonly List<Timer> _timers = new List<Timer>(); | |
public TaskScheduler(ILogger<TaskScheduler> logger) | |
{ |
This file contains 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
public static class GetServiceProvider | |
{ | |
public static IServiceProvider _ { get; set; } | |
public static T GetServiceOrCreateInstance<T>() | |
{ | |
return ActivatorUtilities.GetServiceOrCreateInstance<T>(_); | |
} | |
public static object GetServiceOrCreateInstance(Type type) |
This file contains 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
public class IdleClient : IDisposable | |
{ | |
private readonly string _host, _username, _password; | |
private readonly SecureSocketOptions _sslOptions; | |
private readonly int _port; | |
private readonly CancellationTokenSource _cancel; | |
private CancellationTokenSource _done; | |
private bool _messagesArrived; | |
private readonly ImapClient _client; | |
private readonly bool _deleteOnProcessed; |
This file contains 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
public class EnvironmentVariableLoggingLevelSwitch : LoggingLevelSwitch | |
{ | |
public EnvironmentVariableLoggingLevelSwitch(string environmentVariable, | |
LogEventLevel defaultLevel = LogEventLevel.Information) | |
{ | |
MinimumLevel = | |
Enum.TryParse<LogEventLevel>(Environment.GetEnvironmentVariable(environmentVariable), true, | |
out var level) | |
? level | |
: defaultLevel; |
- Disable FileVault (System Preferences -> Security & Privacy -> FileVault -> Turn Off Filevault)
- Boot to recovery mode by holding
Command + R
during boot
- Open Terminal
- Run
csrutil authenticated-root disable
to disable signature validation on the bootable snapshots - Run
ioreg -l | grep board-id
to get your board ID and write it down.
OlderNewer