Skip to content

Instantly share code, notes, and snippets.

View jaoxford's full-sized avatar

Jacob Oxford jaoxford

View GitHub Profile
@Prurite
Prurite / Joy2Arrow.ahk
Last active August 18, 2024 11:00
Switch DDG Controller to Arrow key
Persistent
#SingleInstance Force
; Set default delay between key presses
keyDelay1 := 40
keyDelay2 := 40
; Axis 1 positions mapped to levels
levels := Map(100, "P5", 90, "P4", 80, "P3", 71, "P2", 61, "P1", 50, "N",
39, "B1", 34, "B2", 28, "B3", 23, "B4", 18, "B5",
12, "B6", 7, "B7", 2, "B8", 0, "EB")
@haykkh
haykkh / fastapi-discord.py
Created June 24, 2020 10:09
How to run a discord.py bot with FastAPI
import asyncio
import discord
from fastapi import FastAPI
app = FastAPI()
client = discord.Client()
# where the magic happens
# register an asyncio.create_task(client.start()) on app's startup event
@vidakDK
vidakDK / pycurl.md
Last active November 2, 2023 03:06
Install `pycurl` on MacOS Big Sur 11.0.1

Introduction

Installing pycurl on MacOS with Python 3.6+ and newer proved to be tricky, especially since a lot of the available resources seem to be outdated ([1], [2], [3]).

This gist was last updated at 2020-12-31.

Steps:

  1. Remove previously installed Homebrew versions of curl:
    brew uninstall curl
@primaryobjects
primaryobjects / m3u8.md
Last active March 10, 2025 06:53
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
1: 日
2: 一
3: 国
4: 会
5: 人
6: 年
7: 大
8: 十
9: 二
10: 本