Skip to content

Instantly share code, notes, and snippets.

View elenakrittik's full-sized avatar

lena elenakrittik

View GitHub Profile
@s3rius
s3rius / Cargo.toml
Last active August 30, 2024 17:49
PyO3-asyncio async streams
[package]
name = "itertest"
version = "0.1.0"
edition = "2021"
[dependencies]
futures = "0.3.28"
pyo3 = "0.19.2"
pyo3-asyncio = { version = "0.19.0", features = ["tokio-runtime"] }
tokio = { version = "1.32.0", features = ["sync"] }

Guide for cross compiling Windows GD Mods on Linux

Requirements

  • clang & llvm (make sure you have clang-cl)
  • cmake (duh)
  • git

1. Setting up xwin

Install xwin, you can also just use one of the unknown-linux tarballs from the releases

@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active September 26, 2024 12:13
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m
@ghostrider-05
ghostrider-05 / discord_app_protocols.md
Last active September 25, 2024 13:45
An unofficial list of discord app protocol routes

Discord app protocol routes

Home:

  • /: discord://-/
  • friends: discord://-/channels/@me/
  • nitro: discord://-/store
  • shop: discord://-/shop
  • message requests: discord://-/message-requests
  • family centre: discord://-/family-center
@pavel-kirienko
pavel-kirienko / 51-xbox-gamepad.rules
Last active June 30, 2024 18:08 — forked from dnmodder/fixcontroller.py
Use Microsoft X-Box 360 Gamepad with GNU/Linux
# By default, X-Box 360-compatible controllers are detectable but dysfunctional because they expect the host
# to send a particular USB control transfer with some sort of initialization command.
# This udev rule will invoke a trivial Python script automatically when the gamepad is connected that emits
# the required initialization command.
#
# Integration:
# 1. Put this rule into /etc/udev/rules.d/51-xbox-gamepad.rules
# 2. Install pyusb for the root's Python: sudo pip install pyusb
# 3. Reload udev rules as root: udevadm control --reload-rules && udevadm trigger
#
@fnky
fnky / ANSI.md
Last active September 25, 2024 03:13
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27