Skip to content

Instantly share code, notes, and snippets.

#!/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 April 26, 2024 05:56
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 April 24, 2024 20:06
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.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active February 19, 2024 09:42
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"
@Earu
Earu / easychat_nametags.lua
Last active April 18, 2020 01:03
An EasyChat nametags module using markup.
surface.CreateFont("NameTagFont", {
font = "Tahoma",
extended = true,
size = 100,
weight = 880,
additive = false,
})
surface.CreateFont("NameTagShadowFont", {
font = "Tahoma",