Skip to content

Instantly share code, notes, and snippets.

@dotcomboom
dotcomboom / weather-rpc.py
Last active September 24, 2022 20:02
Weather rich presence for Discord that uses wttr.in's public api (Weatherbit.io version is in revisions, or check forks)
from pypresence import Presence
import requests
import json
import time
client_id = 704435320808276108
city = 'Minneapolis, MN'
url = 'https://wttr.in/{}?format=j1'.format(city)
@SheepTester
SheepTester / explainer.md
Created May 4, 2020 19:35
Change speed of Edpuzzle video

Edpuzzle aggressively reverts the playbackRate of a <video> element, so you can't simply change it to increase the speed. Thus, a more aggressive response is necessary to combat it.

Firstly, we get the <video> element:

video = document.querySelector('video')

Then, we get the setter function for the playbackRate property using Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'playbackRate').set. It is called with the <video> element as this and with speed as the new value. This way, the <video> element is properly notified of the speed change by simulating assigning a value to playBackRate directly (ie using =).

<!DOCTYPE html>
<html>
<head>
<style>
.editor { font-family: 'Roboto Mono', monospace; font-size: 12px; outline: none; overflow-y: auto; padding-left: 48px; counter-reset: line; }
.editor div { display: block; position: relative; white-space: pre-wrap; }
.editor div::before { content: counter(line); counter-increment: line; position: absolute; right: calc(100% + 16px); opacity: 0.5; }
</style>
</head>
@mat-1
mat-1 / update.py
Last active February 21, 2022 23:01
Put this in your mods folder and run it to automatically update your Fabric mods.
try:
from simplejson.errors import JSONDecodeError
except:
from json import JSONDecodeError
import traceback
import requests
import hashlib
import shutil
import array
import time
@extremeheat
extremeheat / come_bot.py
Created June 22, 2021 08:49
mineflayer bot in python
from JSPyBridge import require, On
mineflayer = require('mineflayer')
pathfinder = require('mineflayer-pathfinder')
RANGE_GOAL = 1
BOT_USERNAME = 'python'
bot = mineflayer.createBot({
'host': '127.0.0.1',
'port': 25565,
@Craftplacer
Craftplacer / FuckFandom.txt
Last active June 2, 2024 23:10
Filter for uBlock Origin that removes most of Fandom's elements from a wiki.
![Adblock Plus 2.0]
! Title: FuckFandom
! Expires: 30 days (update frequency)
! Homepage: https://gist.github.com/Craftplacer/04089c2c666c89e10818124c92d9c65b
fandom.com##.mcf-wrapper
fandom.com##.wds-global-footer
fandom.com##.global-navigation
fandom.com##.top-ads-container
@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active June 26, 2024 01:27
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!

These are the current alternatives (with links when possible):