Skip to content

Instantly share code, notes, and snippets.


Blake Niemyjski niemyjski

View GitHub Profile
niemyjski /
Created Jun 1, 2022
Arm Mac New Install (Brew)
  • xcode-select --install
  • softwareupdate --all --install --force
  • softwareupdate --install-rosetta --agree-to-license
  • Brew
    • brew install --cask microsoft-teams
    • brew install --cask slack
    • brew install --cask discord
    • brew install --cask iterm2
    • brew install --cask dotnet-sdk
  • brew install --cask google-chrome
View ugly.cs
#if false
throw null;
unsafe get @event(ref string @as, byte? @throw = sizeof(double))
lock(typeof(get)) {}
niemyjski / automation.yaml
Created Feb 23, 2022
Home Assistant: Audio - Normalize levels to 10% at 9pm
View automation.yaml
alias: Audio - Normalize levels to 10% at 9pm
- platform: time
at: '21:00:00'
- service: media_player.volume_set
volume_level: 0.1
entity_id: media_player.everywhere,
mode: single
niemyjski / App.test.tsx
Created Jan 31, 2022
React Exceptionless Jest Mock (Jest doesn't yet support esm modules).
View App.test.tsx
import { ClassAttributes, HTMLAttributes } from "react";
jest.mock("@exceptionless/react", () => {
return {
__esModule: true,
Exceptionless: {
startup: jest.fn()
ExceptionlessErrorBoundary: (props: JSX.IntrinsicAttributes & ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement>) => {
return <div {...props} />;
niemyjski / Configuration.h
Last active Jun 10, 2022
Marlin Ender 3 Pro (SKR Mini 2.0) with Creality Touch (6/9/2022 bugfix-2.1.x) based on and other config for cr touch
View Configuration.h
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware []
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
niemyjski / Mark500ErrorsAsCritical.cs
Created Nov 22, 2021
Exceptionless Mark 500 Errors as critical
View Mark500ErrorsAsCritical.cs
public class Mark500ErrorsAsCritical : IEventPlugin {
public void Run(EventPluginContext ctx) {
if (!String.Equals(ctx.Event.Type, Event.KnownTypes.Error))
if (ctx.ContextData.IsUnhandledError)
niemyjski / Ignore404sFromNonUsers.cs
Created Oct 18, 2021
Exceptionless Ignore 404 from non users
View Ignore404sFromNonUsers.cs
public class Ignore404sFromNonUsers : IEventPlugin {
public void Run(EventPluginContext ctx) {
if (!String.Equals(ctx.Event.Type, Event.KnownTypes.NotFound))
// Ignore any 404 that doesn't have user info.
ctx.Cancel = !ctx.Event.Data.ContainsKey(Event.KnownDataKeys.UserInfo);
niemyjski / docker-compose.yml
Last active Oct 15, 2021
Home Assistant Portainer docker-compose for double-take & compreface
View docker-compose.yml
version: '3.7'
container_name: double-take
image: jakowenko/double-take:1.4.1
niemyjski / save-camera-snapshot-notification-on-motion.yaml
Last active Jan 7, 2022
Home Assistant Blueprint - Save a camera snapshot with archive when motion is detected
View save-camera-snapshot-notification-on-motion.yaml
name: Save a camera snapshot when motion is detected
description: Save a camera snapshot with archive when motion is detected
domain: automation
name: Motion sensor
description: The sensor wich triggers the snapshot creation
niemyjski / exceptionless.cs
Last active Dec 15, 2020
Exceptionless Ignore Third Party Exceptions
View exceptionless.cs
// Create our own client instance so we aren't conflicting if anyone else is using exceptionless in an addon.
private readonly ExceptionlessClient _client = new ExceptionlessClient();
private class IgnoreLicensingAndNonGeneratorExceptionsPlugin : IEventPlugin {
private static readonly List<string> _handledNamespaces = new List<string> {