This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections.abc import Generator | |
from typing import Optional, Tuple, Union | |
from base64 import encodebytes, decodebytes | |
from re import findall | |
from Crypto.Cipher import AES | |
class VKCoffeeCypher: | |
DEFAULT_KEY = b"stupidUsersMustD" | |
KEY_PADDING = b"mailRuMustDie" | |
WRAPPERS = "(AP ID OG|PP|VK CO FF EE|VK C0 FF EE|II)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import urllib3 | |
import json | |
import getpass | |
from zipfile import ZipFile | |
import os | |
class API: | |
def __init__(self): | |
self._access_token = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author: hatkidchan (https://github.com/hatkidchan) | |
// Title: noise? | |
// Open in: https://thebookofshaders.com/edit.php | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform vec2 u_mouse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from csv import reader as CSVReader | |
from datetime import datetime | |
from subprocess import Popen, PIPE | |
from PIL import Image, ImageDraw, ImageFont | |
from PIL.ImageColor import getrgb | |
FFMPEG_ARGS = [ | |
"ffmpeg", "-f", "image2pipe", | |
"-i", "-", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from time import sleep | |
with open("/proc/stat", "r") as fh: | |
last_total, last_busy = None, None | |
while True: | |
fh.seek(0) | |
for line in fh: | |
if line.startswith('cpu '): | |
parts = list(map(int, line.split()[1:])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import asyncio | |
import string | |
import random | |
from typing import Union, TypeVar, Tuple | |
from httpx import AsyncClient | |
from httpx_socks import AsyncProxyTransport | |
Result = TypeVar('Result') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// x-run: tcc -lasound -lm -run % -r 600 988 1 1319 4 | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <alsa/asoundlib.h> | |
#include <sys/types.h> | |
#include <math.h> | |
enum { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from random import choice, shuffle, randint | |
from re import findall | |
from os.path import expanduser | |
from sys import argv | |
with open(expanduser("/usr/share/keepassxc/wordlists/eff_large.wordlist"), "r") as f: | |
words = list(map(str.strip, f.readlines())) | |
password_mask = list(argv[1] if len(argv) > 1 else "WWWWWWWWWWWWWWWWDDDS") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# usage: split-font-pages.sh "source-font.ttf" "output.css" "output-prefix" | |
for page in \ | |
"U+0000-007F" "U+0080-00FF" "U+0100-017F" "U+0180-024F" \ | |
"U+0250-02AF" "U+02B0-02FF" "U+0300-036F" "U+0370-03FF" \ | |
"U+0400-04FF" "U+0500-052F" "U+0530-058F" "U+0590-05FF" \ | |
"U+0600-06FF" "U+0700-074F" "U+0750-077F" "U+0780-07BF" \ | |
"U+07C0-07FF" "U+0800-083F" "U+0840-085F" "U+0860-086F" \ | |
"U+0870-089F" "U+08A0-08FF" "U+0900-097F" "U+0980-09FF" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# x-run: python3 % /home/hkc/images/casey/photo_2022-09-20_19-34-19.jpg 64 64 | sh - | |
from zlib import compress | |
from PIL import Image | |
from sys import argv | |
from shlex import quote | |
TEMPLATE = ( | |
"import zlib;" | |
'print("".join([' | |
"chr(x+(10<<10)) for x in zlib.decompress(%r.encode('U16')[2::2])" |
OlderNewer