Skip to content

Instantly share code, notes, and snippets.

View Fuyukai's full-sized avatar
💭
-͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌

Lura Skye Fuyukai

💭
-͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌͌
View GitHub Profile
@Fuyukai
Fuyukai / main.rs
Created December 3, 2023 03:50
aoc 2023 megafile
#![allow(clippy::all)]
#![allow(unused)]
#![allow(non_camel_case_types)]
#![allow(while_true)]
#![feature(ascii_char)]
use std::io;
import logging
import sys
import time
import httpx
logging.basicConfig(level=logging.DEBUG)
class Scraper(object):
@Fuyukai
Fuyukai / fix scp css.js
Created May 16, 2021 20:54
Userscript that disables custom CSS on the SCP Wiki.
// ==UserScript==
// @name Delete Custom SCP CSS
// @match *://scp-wiki.wikidot.com/*
// @match *://www.scpwiki.com/*
// @grant none
// @version 1.0
// @author Lura Skye
// @description Disables custom SCP CSS. Has special handling for a few variants.
// @run_at document-end
// @homepage_url https://gist.github.com/Fuyukai/16a72967f5deef1f3d36f3737ef4e1b5
@Fuyukai
Fuyukai / ufa-fix.css
Created February 16, 2020 21:45
ufa fix
a.ProfileHeaderCard-nameLink {
display: none;
}
h1.ProfileHeaderCard-name:after {
content: "vore imouto ⭐";
}
a.account-group[href="/ufauta"] strong.fullname {
display: none;
}
@Fuyukai
Fuyukai / gist:cecd66bcccb006392d91a24ab947db79
Created January 22, 2020 17:26
Broken Kython debug output due to a compiler bug
idx: 0 | Next instruction: PythonInstruction(opcode=LOAD_BUILD_CLASS, argument=0)
idx: 1 | Next instruction: PythonInstruction(opcode=LOAD_CONST, argument=0)
idx: 2 | Next instruction: PythonInstruction(opcode=LOAD_CONST, argument=1)
idx: 3 | Next instruction: PythonInstruction(opcode=MAKE_FUNCTION, argument=0)
idx: 4 | Next instruction: PythonInstruction(opcode=LOAD_CONST, argument=1)
idx: 5 | Next instruction: PythonInstruction(opcode=CALL_FUNCTION, argument=2)
idx: 0 | Next instruction: PythonInstruction(opcode=LOAD_NAME, argument=0)
idx: 1 | Next instruction: PythonInstruction(opcode=STORE_NAME, argument=1)
idx: 2 | Next instruction: PythonInstruction(opcode=LOAD_CONST, argument=0)
idx: 3 | Next instruction: PythonInstruction(opcode=STORE_NAME, argument=2)
2020-01-04 19:58:28,022 [3673953] ERROR - intellij.openapi.progress.Task - Invalid remote: upstream
org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote: upstream
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:252)
at cloak.git.CloakRepository.updateRemote(CloakRepository.kt:73)
at cloak.git.CloakRepository.switchToBranch(CloakRepository.kt:40)
at cloak.git.YarnRepo.switchToBranch(YarnRepo.kt:103)
at cloak.git.YarnRepo.switchToBranch$default(YarnRepo.kt:93)
at cloak.actions.SubmitActionKt$createPr$2.invokeSuspend(SubmitAction.kt:78)
at cloak.actions.SubmitActionKt$createPr$2.invoke(SubmitAction.kt)
at cloak.idea.platformImpl.IdeaPlatform$asyncWithText$$inlined$suspendCoroutine$lambda$1$1.invokeSuspend(IdeaPlatform.kt:169)
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384;
ssl_dhparam /etc/nginx/ssl/dh4096.pem;
ssl_ecdh_curve secp384r1;
gzip off;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
ssl_session_cache shared:SSL:50m;
ssl_session_timeout 5m;
import trio
async def one():
try:
1 / 0
except ZeroDivisionError:
await two()
@Fuyukai
Fuyukai / ABYSMAL.py
Last active March 17, 2018 21:12
Checking if a function is being awaited
import dis
import inspect
isasyncfn_original = inspect.iscoroutinefunction
def _is_calling_from_async(frameinfo):
"""
Checks if the frame is awaiting the next stack frame.
"""
@Fuyukai
Fuyukai / noclasses.py
Created March 14, 2018 23:08
Python, without classes.
def _suspend_self(namespace, suspended):
"""
Suspends a function, so that it has a self.
:param namespace: The self namespace to use.
:return: A function that will call the next function with self.
"""
def suspender(*args, **kwargs):
return suspended(namespace, *args, **kwargs)