Skip to content

Instantly share code, notes, and snippets.

@Viicos
Viicos / index.html
Created December 20, 2024 21:31
xdg-open repro
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
@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