Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 19, 2025 21:25
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for non-video, non-activity quests! For stream/play quests use the desktop app!

Note

When doing stream quests, you need at least 1 other account in the vc!

How to use this script:

  1. Accept a quest under Discover -> Quests
@thesamesam
thesamesam / xz-backdoor.md
Last active April 7, 2025 09:15
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@matangover
matangover / Python native libs on macOS with M1.md
Last active November 30, 2024 01:23
Allow Python on macOS M1 to import native libraries installed using Homebrew

Your Problem

  1. You are using Python on macOS M1 (or M2, etc) and are trying to install a Python library which uses a native library.
  2. You install the Python library (e.g. using pip) and the native library (using Homebrew).
  3. You get an error saying that the native library cannot be located even though it's installed using Homebrew.

Example: You are trying to use e.g. pyfluidsynth. You've installed pyfluidsynth with pip, and also ran brew install fluidsynth. However, import fluidsynth still gives an error:

ImportError: Couldn't find the FluidSynth library.
@v--
v-- / party_mode.md
Last active December 2, 2024 15:42
Achieve full runtime nondeterminism by randomly selecting which function to run
import sys
import time
import asyncio
import threading
import traceback
import concurrent.futures
import discord
from discord.ext import commands
@pandada8
pandada8 / authy.py
Last active February 17, 2022 14:28
Migrate from authy to pass-otp
import xml.etree.ElementTree as ET
import json
import sys
import re
def load(name):
root = ET.parse(name)
return json.loads(root.findtext('./string'))
def normalize(record):
@omaraboumrad
omaraboumrad / splitlogs.py
Created October 6, 2017 14:18
View docker-compose services logs in split tmux panes
# Requires pyyaml
import os
import yaml
run = os.system
new_window = lambda cmd: run('tmux new-window -n "logs" "{}"'.format(cmd))
split_vertical = lambda cmd: run('tmux split-window "{}"'.format(cmd))
split_horizontal = lambda cmd: run('tmux split-window -h "{}"'.format(cmd))
even_vertical = lambda: run('tmux select-layout even-vertical')
@scarletcafe
scarletcafe / image.py
Last active June 10, 2023 18:54
discord.py rewrite image processing cog example
# basic dependencies
import discord
from discord.ext import commands
# aiohttp should be installed if discord.py is
import aiohttp
# PIL can be installed through
# `pip install -U Pillow`
from PIL import Image, ImageDraw
@sokcuri
sokcuri / key.md
Last active March 6, 2025 03:00
Twitter (un)official Consumer Key

Twitter Official Consumer Key

Twitter for Android

type:            PIN
Consumer key:    3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPhone

type:            PIN

Consumer key: IQKbtAYlXLripLGPWd0HUA

@magnetikonline
magnetikonline / README.md
Last active May 18, 2018 17:23
Ensure HTTP redirects are not cached by client browser.

Ensure HTTP redirects are not cached

Chrome (at least) likes to cache HTTP redirects, an issue if you are running logging/reporting on those redirect actions server side. Combat this with some HTTP headers.

Location: http://domain.com/redirect
Cache-Control: must-revalidate,no-cache,no-store
Expires: Sat, 01 Jan 2000 00:00:00 GMT

Or in PHP land that could be...