Skip to content

Instantly share code, notes, and snippets.

View lukadd16's full-sized avatar
:shipit:

Lukas Adie lukadd16

:shipit:
View GitHub Profile
@LukeLambert
LukeLambert / proxyable-tinypilot.conf
Last active April 10, 2024 23:02
An nginx config to make Tinypilot work with reverse proxies like Traefik, Caddy, Cloudflare Tunnel, ngrok, etc. Updates to Tinypilot should not delete or overwrite this file.
# Save this file as /etc/nginx/sites-enabled/proxyable-tinypilot.conf
# Restart nginx: service nginx restart
# Point your reverse proxy to 127.0.0.1:8899
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
# scheme used to connect to this server
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}
@tuetenk0pp
tuetenk0pp / media-workflow-jellyfin.md
Last active February 22, 2024 06:16
Media Workflow for Jellyfin
@raysan5
raysan5 / open_source_and_videogames.md
Last active June 13, 2024 06:17
Open Source and Videogames - Resources

open_source_and_videogames

Open Source and Videogames - Resources

This git include a list of programs, tools, engines and libraries free and open source intended to make videogames.

NOTE: This gist is a support material for the talk "Open Source and Videogames" given by me, Ramon Santamaria, on October 26th 2021 in Canòdrom, Barcelona. All the materials listed here were explained in detail in a +2 hours talk.

Contents

Security Guide for Discord Bots using discord.py

Discord bots, just like web servers, deal with untrusted data. Most of those bots implement interactive commands, which makes the attack surface significantly larger. This guide is to improve security of Discord bots.

Security is usually represented by the three elements of CIA (not related to the agency) - Confidentiality, Integrity, and Availability.

  • Confidentiality: Protecting your secrets (and others' secrets) from attackers. "Secrets" include your bot token, message contents and other PII, files stored on your computer and other private data.
  • Integrity: Protecting your data from manipulation by attackers. "Manipulation" can vary from compromising the host computer to improper permissions/roles assignment or data spoofing/tampering (e.g. cheating in a chess game to obtain points).
  • Availability: Protecting your bot from crashes or similar situations. Examples include infinite loop, blocking codes and error handling issues.

Here are some tips to im

Breaking Changes of discord.py 2.0

These are the breaking changes of discord.py version 2.0.

"Breaking change" includes:

  • [R]emoval: a feature is removed.
  • [N]ame changes: a feature is renamed.
  • [B]ehavior: something does not behave the way they did in 1.x.
  • [T]yping: types of arguments, attributes or return values changes in an incompatible way. (e.g. None disallowed for argument)
  • [S]yntax: a syntax previously allowed for an operation is no longer allowed. (e.g. positional only arguments, new required arguments)
@markuskreitzer
markuskreitzer / README.md
Created July 30, 2018 16:15
How to connect a Raspberry Pi to a WPA2 Enterprise Network

How to connect a Raspberry Pi to a WPA2 Enterprise Network

tags: Auburn, Auburn University, WPA2, WPA2 Enterprise

Auburn University is gracious enough to provide instructions to Ubuntu users on how to connect their hosts to the Auburn University WiFi Network.

Many Universities use WPA2 Enterprise authentication on their networks. This allow you to track WHO is connected where and have granular control over who's able to access the WiFi network.

For tinkerers and experimenters with Raspberry Pi, Particle Photon, and other embedded systems, this poses a problem because many simplier IoT devices do not support WPA2 Enterprise natively or not without some hassle.

Raspbian Jesse and earlier will display a WPA2 Enterprise network from its dropdown list, but it will be greyed out. The workaround is to manually connect to it:

Objective

The goal is being able to mix your microphone and desktop audio into a single track, while leaving Discord out of the equation. This allows you to stream your desktop audio and talk while in a call, without your partners hearing themselves.

Voicemeeter Setup

Download Voicemeeter

Voicemeeter Banana

@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active June 27, 2024 15:56
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@EvieePy
EvieePy / error_handler.py
Last active May 27, 2024 17:01
Simple Error Handling for ext.commands - discord.py
"""
If you are not using this inside a cog, add the event decorator e.g:
@bot.event
async def on_command_error(ctx, error)
For examples of cogs see:
https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be
For a list of exceptions:
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#exceptions
@lukas-h
lukas-h / license-badges.md
Last active June 25, 2024 11:34
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)