Skip to content

Instantly share code, notes, and snippets.

View noseratio's full-sized avatar

Andrew Nosenko noseratio

View GitHub Profile
@marvinhagemeister
marvinhagemeister / bind-plugin.ts
Last active January 9, 2024 20:31
Preact Signals `bind:value`
import { options } from "preact";
import { Signal } from "@preact/signals";
// Add `bind:value` to JSX types
declare global {
namespace preact.createElement.JSX {
interface HTMLAttributes {
"bind:value"?: Signal<string | string[] | number | undefined>;
}
}
@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);
@noseratio
noseratio / remove-unwanted-windows11-apps.ps1
Last active April 13, 2024 04:57
Windows 11 autorun resident apps that I have to remove manually
# Teams 2.0 (no work account support yet)
winget uninstall MicrosoftTeams_8wekyb3d8bbwe
# Your Phone
winget uninstall Microsoft.YourPhone_8wekyb3d8bbwe
# Widgets (Web Experience Pack)
winget uninstall MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy
# Cortana
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Single File Web Component</title>
<style>
body {
background-color: #eee;
font-family: Helvetica, sans-serif;
}
@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;
@MelbourneDeveloper
MelbourneDeveloper / JsonValue.cs
Created June 24, 2021 07:44
Json Data Structure
using System.Collections.Immutable;
namespace JsonDataStructure
{
public record JsonValue
{
public ValueType ValueType { get; }
public string? StringValue { get; init; }
public bool? BooleanValue { get; init; }
@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

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.