Skip to content

Instantly share code, notes, and snippets.

View NickCraver's full-sized avatar
:shipit:
Shipping

Nick Craver NickCraver

:shipit:
Shipping
View GitHub Profile
@NickCraver
NickCraver / TweetDeckDark.css
Last active December 10, 2020 07:52
TweetDeck Dark Theme
@-moz-document domain("tweetdeck.twitter.com") {
html.dark {
color: #e1e8ed;
}
html.dark body:before {
background-image: radial-gradient(circle, #1c6399, #274256);
}
html.dark body,
html.dark .app-header,
html.dark .app-title,
@NickCraver
NickCraver / Program.cs
Created October 16, 2018 16:49
.NET Core Exceptions memory leak repro
using System;
using System.Threading.Tasks;
namespace ConsoleApp2189
{
public static class Program
{
public static void Main(string[] args)
{
while (true)
@NickCraver
NickCraver / DarkMode.js
Last active February 14, 2019 18:31
A quick and dirty re-purpose of UniFi dark elements to make them global.
// A JS example that shows they're well on their way to a dark theme:
document.body.classList.add("ubnt-mod-dark");
document.querySelectorAll(".appTable").forEach(i => i.classList.add("appTable--dark"));
document.querySelectorAll(".ubntPanelContent").forEach(i => i.classList.add("appForm--dark"));
document.querySelectorAll(".appMainButtonGroup").forEach(i => i.classList.add("appMainButtonGroup--dark"));
@NickCraver
NickCraver / OptInRelationalModelSource.cs
Last active August 22, 2018 19:31
OptInRelationalModelSource.cs - Making EF Core opt-in instead of opt-out for properties
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Reflection;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Infrastructure.Internal;
using Microsoft.EntityFrameworkCore.Metadata.Conventions;
using Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal;

Keybase proof

I hereby claim:

  • I am nickcraver on github.
  • I am nickcraver (https://keybase.io/nickcraver) on keybase.
  • I have a public key ASAVMojHFRx86OeapA0fAbGblg0VzqFn4agNkah58X9ixQo

To claim this, I am signing this object:

@NickCraver
NickCraver / DelayTest.cs
Created July 22, 2018 12:14
A simple program showing Task.Delay(1) and what really happens
async Task Main()
{
for (var i = 0; i < 20; i++)
{
await Run(); // Just to show it many times
}
}
public async Task Run()
{
@NickCraver
NickCraver / Craver-Paradox.ps1
Last active April 20, 2022 03:05
My PowerShell PoshGit theme (used with Cmder)
#requires -Version 2 -Modules posh-git
# This is a tweaked version of https://github.com/JanJoris/oh-my-posh/blob/master/Themes/Paradox.psm1
function Write-Theme {
param(
[bool]
$lastCommandFailed,
[string]
$with
)
@NickCraver
NickCraver / MiniProfiler ReadMe.cs
Last active September 25, 2020 11:24
MiniProfiler README Table Generator
var packages = new[] {
"MiniProfiler",
"MiniProfiler.AspNetCore",
"MiniProfiler.AspNetCore.Mvc",
"MiniProfiler.EF6",
"MiniProfiler.EntityFrameworkCore",
"MiniProfiler.Mvc5",
"MiniProfiler.Providers.MongoDB",
"MiniProfiler.Providers.MySql",
"MiniProfiler.Providers.Redis",
@NickCraver
NickCraver / notblue.css
Last active October 6, 2018 19:20
TweetDeck Dark Theme - Revert the Blue
html.dark .column, html.dark .stream-item {
background-color: #222426;
}
html.dark .detail-view-inline-text {
background: #fff;
color: #8899a6;
}
html.dark a, html.dark a:hover,
html.dark .other-replies-link, html.dark .other-replies-link:hover,
html.dark .btn-neutral-positive, html.dark .btn-neutral-positive:hover, html.dark .btn-neutral-positive:focus {
@NickCraver
NickCraver / Http.cs
Last active January 17, 2020 01:10
HttpClient Ideas
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;