Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active November 9, 2024 20:15
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

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

Warning

There are now two quest types ("stream" and "play")! Pay attention to the instructions!

#!/usr/bin/env python3
# Download your data dump and place this file in the "messages" folder of your data dump.
# Run it using python
from datetime import datetime, timedelta, timezone
import dateutil.parser
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
import csv
@hibiii
hibiii / ifmutil.sh
Created June 25, 2023 03:21
Bash device to allow selecting files for file management in a more interactive way
# Interactive File Management Utilities by hibi
#
# This source file will let you select individual files and copy and move them
# around much like a graphical file manager would. Intended to be used with
# `source` in your bashrc.
#
# Usage:
# Fsel name1 [name2 [...]] - selects files and folders
# Funsel [name1 [name2 [...]]] - unselects files and folders, or all
# Fcp [destination] - copies the files here or to destination
#!/bin/sh
set -eux
BRANCH=canary
ICONDIR="${XDG_DATA_HOME:=$HOME/.local/share}/icons"
APPDIR="$XDG_DATA_HOME/applications"
DISCORDDIR="$HOME/.local/opt/discord-$BRANCH"
mkdir -p "$ICONDIR" "$APPDIR" "$DISCORDDIR"
@agyild
agyild / FSR.glsl
Last active November 5, 2024 05:34
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@unascribed
unascribed / randomUUID.js
Last active October 5, 2023 11:35
A simple and readable way to generate valid v4 UUIDs in JavaScript. CC0 https://creativecommons.org/publicdomain/zero/1.0/
function randomUUID() {
return randhex(8) + "-" + randhex(4) + "-4" + randhex(3) + "-" + choice(["8", "9", "a", "b"]) + randhex(3) + "-" + randhex(12);
}
let scratchTarr = new Uint32Array(1);
function choice(arr) {
crypto.getRandomValues(scratchTarr);
return arr[Math.floor(scratchTarr[0]%arr.length)]
}
function randhex(count) {
crypto.getRandomValues(scratchTarr);
@probonopd
probonopd / Wayland.md
Last active November 18, 2024 22:26
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.

In fact, it is merely an incompatible alternative, and not e

@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active October 1, 2024 15:12
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

CHECK OUT THIS GUY HE'S IN THE GIST
⣠⣦⣤⣀
⠀⠀⠀⠀⢡⣤⣿⣿
⠀⠀⠀⠀⠠⠜⢾⡟
⠀⠀⠀⠀⠀⠹⠿⠃⠄
⠀⠀⠈⠀⠉⠉⠑⠀⠀⠠⢈⣆
⠀⠀⣄⠀⠀⠀⠀⠀⢶⣷⠃⢵
⠐⠰⣷⠀⠀⠀⠀⢀⢟⣽⣆⠀⢃
⠰⣾⣶⣤⡼⢳⣦⣤⣴⣾⣿⣿⠞
⠀⠈⠉⠉⠛⠛⠉⠉⠉⠙⠁
@CapsAdmin
CapsAdmin / spleeter.cmd
Last active January 1, 2024 06:01
This makes it possible to run spleeter without having to install pyton and pip on windows. See http://github.com/deezer/spleeter for more info on what spleeter is. Usage is `.\spleeter.cmd separate -p spleeter:5stems -o amen .\amenbrother.wav`
@echo off & PowerShell -nologo -noprofile -noninteractive Invoke-Expression ('$args=(''%*'').split('' '');'+'$PSScriptRoot=(''%~dp0'');$env:GOLUWA_CURRENT_DIRECTORY=(''%cd%'');'+((Get-Content -Raw '%~dp0%~n0%~x0' ) -Replace '^.*goto :EOF')); & goto :EOF
# ^^^^^
# this is some magic to execute the rest of this cmd as powershell
# so we can run it from explorer with double click or cmd easily
function Download($url, $location) {
Write-Host -NoNewline "'$url' >> '$location' ... "
(New-Object System.Net.WebClient).DownloadFile($url, "$location")
Write-Host "OK"