Skip to content

Instantly share code, notes, and snippets.

View theY4Kman's full-sized avatar

Zach Kanzler theY4Kman

View GitHub Profile
@theY4Kman
theY4Kman / triggers.sp
Created January 15, 2021 23:42
Screwing around w/ updating formatting on Triggers SourceMod plugin – https://forums.alliedmods.net/showthread.php?t=67098
#pragma semicolon 1
#include <sourcemod>
#define PLUGIN_VERSION "2.3.0"
public Plugin:myinfo = {
name = "Triggers",
author = "theY4Kman",
description = "Advanced commandlist.txt functionality",
{
parserClass="org.idea_sp.parser.SourcePawnParser"
extends="com.intellij.extapi.psi.ASTWrapperPsiElement"
psiClassPrefix="SourcePawn"
psiImplClassSuffix="Impl"
psiPackage="org.idea_sp.psi"
psiImplPackage="org.idea_sp.psi.impl"
@theY4Kman
theY4Kman / named_pipes.py
Created July 20, 2021 20:49
A context manager that provides in-memory data to a spawned subprocess through a named pipe
import os
import threading
class StaticContentNamedPipe(threading.Thread, str):
"""Facilitates passing in-memory content to a spawned process as a named pipe (Linux only)
>>> import subprocess
>>> with StaticContentNamedPipe("my content") as named_pipe:
... proc = subprocess.run(["cat", named_pipe], pass_fds=[named_pipe],
@theY4Kman
theY4Kman / requirements.txt
Last active May 19, 2024 19:56
Xfce4 panel plugin enabling easy switching between display profiles
pygobject
dbus-python
python-xlib
@theY4Kman
theY4Kman / bakkesmod.dll-quality-strings.sh
Created October 26, 2021 16:03
Shows the quality strings returned by bakkesmod.dll
strings ./dll/bakkesmod.dll 2>&1 \
| \grep -E '^(Common|Uncommon|Rare|Very ?rare|Import|Exotic|Black ?market|Premium|Limited|Legacy)$'
Common
Rare
Very rare
Uncommon
Black market
Premium
Import
// ==UserScript==
// @name Enable paste on Quest
// @version 0.1
// @description Enable paste on Quest diagnostics input fields
// @updateURL https://gist.github.com/theY4Kman/8054da715976e1765655da4236ec4f6f/raw/quest-paste.user.js
// @match https://myquest.questdiagnostics.com/*
// @grant none
// ==/UserScript==
(function() {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from _typeshed import Incomplete
from collections.abc import Generator
from typing import Any, Generic, Type, TypeVar
from sqlalchemy.orm.query import Query
from sqlalchemy.orm.session import Session
from . import utils as utils
from .model import DefaultMeta as DefaultMeta, Model as Model
@task
def perchy(c):
"""Perchy Print"""
perchy = '''\
*:::
*::::::
*::::::::::
*:::::::::::::
*:::::::::::::::
*::::::::::::::::::