Skip to content

Instantly share code, notes, and snippets.

View brw's full-sized avatar
📝
/人◕ ‿‿ ◕人\

Bas van den Wollenberg brw

📝
/人◕ ‿‿ ◕人\
View GitHub Profile
@bradoaks
bradoaks / hfsc-shape.sh
Created April 25, 2011 14:51 — forked from eqhmcow/hfsc-shape.sh
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.
@baweaver
baweaver / ruby_books.md
Last active January 5, 2025 01:42
A list of books for learning and expanding on your Ruby knowledge.

Ruby Book List

Learning Ruby

You're taking your first steps into Ruby

A good introduction to programming in general. Easy on newer programmers.

@JonnyWong16
JonnyWong16 / update_all_metadata.py
Last active December 23, 2024 16:55
Updates all metadata in the Tautulli database after moving Plex libraries.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates all metadata in the Tautulli database after moving Plex libraries.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import requests
@meew0
meew0 / apitosqa.md
Last active December 21, 2024 06:53
API ToS Q&A Summary

This is a summary of the Q&A regarding the new API ToS that took place in the #api channel on the Discord API server, starting around midnight UTC on Thursday, August 17, 2017.

All answers are from b1nzy unless marked otherwise. This is just a summary of my (meew0) own interpretation of the Q&A; obviously this shouldn't be interpreted as anything legally binding. If in doubt, ask the devs yourself or consult a lawyer. I'm not responsible if you get banned or sued because of this document. All subsequent usages of first-person pronouns refer to the people asking/answering the questions, respectively.

Q. How do we detect users deleting their accounts, if we have to delete their data within 7 days?
A. You will get an email by Discord if that happens. Make sure the account that registered the bot application has an email attached to it that you actually get messages with. This may change in the future but if it will, there will be plenty of time before the new mechanism goes into effect.

Q. **Do we need

@JonnyWong16
JonnyWong16 / plex_discord_rpc.py
Last active May 26, 2023 03:01
Discord Rich Presence for Plex
import asyncio
import json
import os
import struct
import sys
import time
from plexapi.myplex import MyPlexAccount
### EDIT SETTINGS ###
@730730
730730 / ab-filter.user.js
Last active January 8, 2024 19:33
Tampermonkey script that adds filtering and sorting capabilities to AnimeBytes torrent groups
// ==UserScript==
// @name AB Filter/Sorter
// @version 1.0
// @description Adds a table of filters to AnimeBytes torrent groups and the possibility to sort by size/snatches/seeders/leechers
// @author 730
// @match https://animebytes.tv/torrents.php?id=*
// @updateURL https://gist.githubusercontent.com/730730/241caafc5ee60ea83d537a80051aecc4/raw/ab-filter.user.js
// @downloadURL https://gist.githubusercontent.com/730730/241caafc5ee60ea83d537a80051aecc4/raw/ab-filter.user.js
// @grant none
// ==/UserScript==
// ==UserScript==
// @name AB search autocomplete
// @namespace https://github.com/po5
// @version 0.2.0
// @description :cool:
// @author Eva
// @homepage https://animebytes.tv/forums.php?action=viewthread&threadid=24689
// @icon https://animebytes.tv/favicon.ico
// @updateURL https://gist.github.com/po5/a56f53567eca72f2f32f2545e0236d39/raw/ab-search-autocomplete.user.js
// @downloadURL https://gist.github.com/po5/a56f53567eca72f2f32f2545e0236d39/raw/ab-search-autocomplete.user.js
from feedparser import parse
from aiohttp import ClientSession
from discord.ext.commands import Bot
from os import getenv
from tinydb import TinyDB, Query
from os.path import join
from asyncio import sleep,get_event_loop
from traceback import print_exc
client = Bot('ab!')
@mbartelsm
mbartelsm / readme.md
Last active August 8, 2024 06:01
VSCode context menu to open WSL

I'm tired of always struggling to open a folder in VSCode using WSL. You normally have to open the current folder in Code, wait for it to load, then reopen in the remote, which closes and reopens Code, so you have to wait for it to load everything once more. The alternative is to open a WSL shell, which takes it's good time too, navigate via the terminal to the folder you want, then open Code.

I just want to right click and be done. So I arranged a little something.

DISCLAIMER Before you proceed, back up your registry. If something breaks, that's on you for not having a backup.

This registry file will delete the current context menu entry for VSCode and replace is with a submenu that lets you choose wether to open it up normally, or via WSL. It only works when right clicking on a folder or on the background.

Something you might want to do before running it is to verify that the installation paths are the same ones you have in your set-up. If you don't have WSL in your PATH, you will either need to edi