Skip to content

Instantly share code, notes, and snippets.

@Viicos
Viicos / remove_github_force_push_actions.js
Created February 22, 2024 11:58
Remove Github force push actions Tampermonkey
// ==UserScript==
// @name Remove Github force push actions
// @namespace http://tampermonkey.net/
// @version 2024-02-09
// @description Remove Github force push actions
// @author You
// @match https://github.com/*/*/pull/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant none
// ==/UserScript==
@Viicos
Viicos / dataclasses_init_var_properties.py
Created August 14, 2023 19:38
dataclasses, InitVar and properties
from dataclasses import dataclass, field, InitVar
@dataclass
class A:
_x: int = field(init=False)
x: InitVar[int]
def __post_init__(self, x: int) -> None:
self.x = x