Skip to content

Instantly share code, notes, and snippets.

View XCanG's full-sized avatar
💾
do impossible, beat unbeatable

XCanG XCanG

💾
do impossible, beat unbeatable
View GitHub Profile
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 5, 2024 06:55
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@gsuberland
gsuberland / twitter_video_hq_tampermonkey.js
Created November 7, 2021 14:45
Tampermonkey / Greasemonkey script to force high quality video on Twitter
// ==UserScript==
// @name Load HQ Video on Twitter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Forces Twitter to always load the highest bitrate video available.
// @author Graham Sutherland
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?domain=twitter.com
// @grant none
// ==/UserScript==
@MPThLee
MPThLee / enableDiscordExperiments.js
Last active April 25, 2024 05:50
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
/**
* !!!! This code doesn't work anymore !!!!
*
* - You can check working code on comments. I won't update this code anymore.
*
* Also, I just decided to remove this code. You can check revisions for old code.
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
* I don't want people keep arguing in the comments, i decided to remove this code.
*
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.
@troyhunt
troyhunt / uniform-urls.js
Created September 4, 2018 23:10
Cloudflare Worker to normalise URLs for cache efficiency
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request));
})
/**
* Fetch request after making casing of hash prefix uniform
* @param {Request} request
*/
async function handleRequest(request) {
@Gorialis
Gorialis / 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
@nicolasdao
nicolasdao / open_source_licenses.md
Last active May 2, 2024 18:16
What you need to know to choose an open source license.
@kageru
kageru / README.md
Last active March 31, 2022 12:03
Standalone script using Vapoursynth to determine the original resolution of scaled images or videos.

This version is deprecated

I’ve stopped updating this a while ago because some people made a proper respository with a few necessary fixes and changes. Just get this version from now on: https://github.com/Infiziert90/getnative

@leovoel
leovoel / basic_bot.py
Last active January 25, 2024 04:19
discord.py's basic_bot.py converted to use "cogs".
from discord.ext import commands
description = '''An example bot to showcase the discord.ext.commands extension
module.
There are a number of utility commands being showcased here.'''
# this specifies what extensions to load when the bot starts up
startup_extensions = ["members", "rng"]
:;while [ $? -eq 0 ];do nc -vlp 8080 -c'(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b|sed 's/[^a-z0-9_.-]//gi'`;h="HTTP/1.0";o="$h 200 OK\r\n";c="Content";if [ -z "$f" ];then ($e $o;(for n in *;do if [ -f "$n" ]; then $e "<a href=\"/$n\">`ls -gh \"$n\"`</a><br>";fi;done););elif [ -f "$f" ];then $e "$o$c-Type: `file -ib \"$f\"`\n$c-Length: `stat -c%s \"$f\"`";$e;$e $f>&2;cat "$f";else $e -e "$h 404 Not Found\n\n404\n";fi)';done
@tylerneylon
tylerneylon / learn.lua
Last active April 28, 2024 22:23
Learn Lua quickly with this short yet comprehensive and friendly script. It's written as both an introduction and a quick reference. It's also a valid Lua script so you can verify that the code does what it says, and learn more by modifying and running this script in your Lua interpreter.
-- Two dashes start a one-line comment.
--[[
Adding two ['s and ]'s makes it a
multi-line comment.
--]]
----------------------------------------------------
-- 1. Variables and flow control.
----------------------------------------------------