Skip to content

Instantly share code, notes, and snippets.

View noseratio's full-sized avatar

Andrew Nosenko noseratio

View GitHub Profile
@SimonCropp
SimonCropp / Enabling_OSS_sustainability.md
Last active January 3, 2021 18:51
Enabling OSS sustainability

Add "requesting sponsorship" to package metadata

Package formats (nuget, npm etc) should be amended to add the concept of "this package is requesting sponsorship via ...". The "via..." part could be influence by the GitHub Funding.yml convention.

Surface "requesting sponsorship" in tooling

Once "requesting sponsorship" metadata is added, tooling can expose this in a variety of ways. For example:

09.04.2021 — 8h

  • Setup blitz project
  • Add Github and Gmail auth
  • Send emails with link to reset password
  • Create an email template
  • Setup CI for tests and builds
  • Send confirmation email after creating an account with login and password
  • Handle account confirmation on the frontend
  • Update DB models to contain info about origin and confirmed account
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidfowl
davidfowl / Program.cs
Last active December 26, 2021 00:27
A minimal fully asynchronous C# ASP.NET Core 3.0 application with routing (learn more about ASP.NET Core here https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-3.0)
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
public class Program
{
public static void Main(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
@harrisonlingren
harrisonlingren / fix_windows.bat
Last active February 5, 2022 20:25
A script to fix Windows 10 shit
@rem *** Disable Some Service ***
sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
sc config DiagTrack start= disabled
sc config diagnosticshub.standardcollector.service start= disabled
sc config dmwappushservice start= disabled
@Damovisa
Damovisa / private-health.md
Last active August 25, 2022 07:38
Australian Private Health Insurance

How Private Health Insurance works in Australia (for hospital procedures)

Disclaimer: I'm not an expert, and this is what I've gathered to the best of my ability. I could be wrong in parts. I'm almost certainly missing some detail and have some terminology wrong.

What happens when you go to hospital for a procedure?

If you end up in hospital for a procedure, you'll incur a number of costs. Insurance generally breaks these down into Hospital Expenses, and Medical Expenses. Hospital expenses are things like your bed on the ward, operating theatre fees, and administrative fees. Medical expenses are what your doctors charge - if it's an operation, that'll be your surgeon and the anaesthetist.

If you're a public patient at a public hospital, Medicare will pay for both of these. You shouldn't be out of pocket at all. But if you're a private patient at a public or private hospital, Medicare will only pay some. This is where private health insurance comes in. Private health insurance also means you

@noseratio
noseratio / make-msbuild-shim.ps1
Last active May 2, 2023 11:31
A workaround for "node-gyp is unable to find msbuild if VS2019 is installed": https://github.com/nodejs/node-gyp/issues/1663
<#
This is a workaround for "node-gyp is unable to find msbuild if VS2019 is installed"
https://github.com/nodejs/node-gyp/issues/1663
It create a shim EXE as "MSBuild\15.0\Bin\MSBuild.exe" to target "MSBuild\Current\Bin\MSBuild.exe"
By noseratio - MIT license - use at your own risk!
It requires admin mode, I use wsudo/wsudox (https://chocolatey.org/packages/wsudo) for that:
wsudo powershell -f make-msbuild-shim.ps1
#>
#Requires -RunAsAdministrator
@davidwhitney
davidwhitney / Container.test.ts
Last active May 2, 2023 11:34
TypeScript Really Simple DI
import { Container, Inject } from "./Container";
describe("Container", () => {
it("should be able to get a class", () => {
const container = new Container();
container.register(TestClass);
const result = container.get<TestClass>(TestClass);
@akarpov89
akarpov89 / InterpolatedParsing.cs
Created October 1, 2021 14:58
Interpolated parsing technique
using System.Runtime.CompilerServices;
using static ParsingExtensions;
string input = "Name: Andrew; Age: 31";
string? name = null;
int age = 0;
if (input.TryParse($"Name: {Placeholder(ref name)}; Age: {Placeholder(ref age)}"))
{
using System;
using System.Reactive.Linq;
using System.Reactive.Subjects;
public class ReplayLimitedSubscriptionsSubject<T> : ISubject<T>
{
private readonly ISubject<T> _subject = new Subject<T>();
private readonly int _replayMaxSubscriptions;
private ReplaySubject<T> _replaySubject;
private int _subscriptionsCount = 0;