Skip to content

Instantly share code, notes, and snippets.

@chayleaf
chayleaf / ngo_x.py
Last active August 22, 2023 18:12
needy girl overdose/needy streamer overload localization extraction
import struct
import sys
class Reader:
def __init__(self, f):
self.f = f
self.t = 0
def r(self, n):
ret = self.f.read(n)
@chayleaf
chayleaf / README.md
Last active March 2, 2023 06:43
xash3d-fwgs vulkan fork on NixOS
@chayleaf
chayleaf / README.md
Last active March 2, 2023 08:50
xash-rt on NixOS
@chayleaf
chayleaf / README.md
Last active March 1, 2023 23:48
Xash3D on NixOS
  1. (this isn't necessary if you're on a 32-bit x86 platform) Copy files from fwgs-hlsdk derivation to Half-Life dir (there shouldn't be any conflicting files). Example output with an AMD64 host platform:
fwgs-hlsdk-2023-02-22
└── valve
    ├── cl_dlls
    │   └── client_amd64.so
    └── dlls
        └── hl_amd64.so
@chayleaf
chayleaf / generate.py
Last active January 28, 2022 04:55
lightweight unicode collation+lowercasing (only cyrillics+some diacritics)
#!/usr/bin/env python3
# Copyright: pavlukivan 2022
# License: 0BSD (Meaning this notice can be removed, use this as you like)
# Tested on Py3.10, should work even on Py3.6 though
import functools
import itertools
import unicodedata
@chayleaf
chayleaf / ip.md
Last active April 16, 2021 15:23
copyright/ip opinion

As a hacker, I love to tinker with stuff. While I love to tinker with tech, I love to tinker with information as well. To put it simply, I'm a hacker and a pirate. Game mods, memes, fan games - are all things I consider strictly beneficial for society, and sadly, they all infringe copyright or at least are discouraged by it. Piracy's effect on society is debatable - it forces the work into an illegal public domain, which can be a good or a bad thing - I'm not as saddened by the fact it infringes copyright, even though I still disagree with the law. For example, I dislike Windows piracy because it still plays for Microsoft's network effect, and some potential Linux users use Windows instead. I absolutely don't consider having pirated IDA wrong - I don't have that kind of disposable income so it had zero effect on Ilfak's pockets, while it gave me a lot of hacking knowledge, saving me time over other (heavily inferior at the time, before Ghidra was a thing) tools I would've potentially used. Perhaps it can be s

@chayleaf
chayleaf / abc.py
Created July 12, 2019 12:49
pattern complexity test
import sys,os
# hardcoded aether ritual patterns
p = ['''
1,d
3,k
5,d
6,k
7,d
11,d
12,d
@chayleaf
chayleaf / abc.py
Created July 12, 2019 12:13
pattern complexity test
import sys,os
# hardcoded aether ritual patterns
p = ['''
1,d
3,k
5,d
6,k
7,d
11,d
12,d
@chayleaf
chayleaf / marathons.py
Last active June 14, 2019 14:34
osu! map joiner
#pls report bugs to u/pavlukivan on reddit
#dependencies (install via pip): osu; pydub.
from osu import Beatmap, SampleSet
from osu.events import BackgroundEvent
from pydub import AudioSegment
import random, os
#one file per line
bmFiles = [f for f in '''
/run/media/pavlukivan/7C6CE42C6CE3DF40/osu!/Songs/118 TRF - Survival dAnce _no no cry more_/TRF - Survival dAnce ~no no cry more~ (Echo49) [Insane].osu