Skip to content

Instantly share code, notes, and snippets.

View MiYanni's full-sized avatar

Michael Yanni MiYanni

  • Microsoft
  • Seattle, WA
View GitHub Profile
@velzie
velzie / manifest-v2-chrome.md
Last active September 11, 2025 12:21
How to keep using adblockers on chrome and chromium

NOTE

by the time you're reading this, this probably no longer works since the policy has been removed. I reccomend you to check out https://github.com/r58Playz/uBlock-mv3 instead

How to keep using adblockers on chrome and chromium

  1. google's manifest v3 has no analouge to the webRequestBlocking API, which is neccesary for (effective) adblockers to work
  2. starting in chrome version 127, the transition to mv3 will start cutting off the use of mv2 extensions alltogether
  3. this will inevitably piss of enterprises when their extensions don't work, so the ExtensionManifestV2Availability key was added and will presumably stay forever after enterprises complain enough

You can use this as a regular user, which will let you keep your mv2 extensions even after they're supposed to stop working

@baronfel
baronfel / spec.md
Last active March 27, 2024 18:53
.NET SDK Compound Templates

Core Idea

Allow templates to easily orchestrate the invocation of other templates by name/id, making multi-project and multi-item templates easier to keep up to date, and factoring out subsets of currently-giant templates into maintainable chunks.

Motivating Examples

  • A JS API with a corresponding .NET Backend
  • A Library project, a console project, and a test project
@fearthecowboy
fearthecowboy / FluentConsole.ps1
Created June 9, 2022 19:16
FluentConsole for PowerShell
<##
FluentConsole Functions
(C) 2022 Garrett Serack
License: MIT
Usage:
dot source this into your script (. FluentConsole.ps1 )
and then you can use the colon-prefixed functions.
You can separate colon-function calls with ';' or '|' or a newline.
@martinwoodward
martinwoodward / mermaid.md
Created February 11, 2022 20:34
GitHub HTML Rendering Pipeline
```mermaid
sequenceDiagram
    participant dotcom
    participant iframe
    participant viewscreen
    dotcom->>iframe: loads html w/ iframe url
    iframe->>viewscreen: request template
    viewscreen->>iframe: html & javascript
 iframe-&gt;&gt;dotcom: iframe ready

The numbers in brackets denote the split index of the section if using the autosplitter script. Using the autosplitter script is at your own risk as we haven't figured out how the anti-cheat works.

LOOP 0 (Intro)

Coast (1)

  • Meet Juliana in her library

LOOP 1 (Intro)

@jimmyca15
jimmyca15 / Certificate.cs
Created December 13, 2017 02:10
Code for creating a self signed certificate in .NET Core using CertEnroll APIs
namespace CreateCert
{
using System;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using System.Threading.Tasks;
class Certificate
{
public static async Task<X509Certificate2> Create(string subject, string friendlyName, IEnumerable<string> alternativeNames)
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active September 12, 2025 09:40
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux

Converting ServiceClientCredentials to SubscriptionCloudCredentials for Azure Management Clients

When using Azure SDK clients that depend on different runtimes (Microsoft.Azure.Common, Microsoft.Rest.ClientRuntime) together, authentication can be a problem, because the authentication libraries for both runtimes are highly encapsulated, and only one authentication should be required for all the Azure management clients used.

To resolve this, you can use an adapter like the following that converts ServiceClientCredentials (required for the Microsoft.Rest.ClientRuntime clients) to SubscriptionCloudCredentials (required by Microsoft.Azure.Common clients).

@juanca
juanca / github_load_all_diffs.js
Created March 2, 2017 18:42
Github PR bookmarklet: Load all file diffs
javascript:
document.querySelectorAll('.load-diff-button').forEach(node => node.click())
@mdo
mdo / 00-intro.md
Last active September 2, 2025 03:47
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top