Skip to content

Instantly share code, notes, and snippets.

View alula's full-sized avatar

alula

View GitHub Profile

How to HDR stickers on Discord

Someone found out HDR emojis and stickers work on Slack: https://sharpletters.net/2025/04/16/hdr-emoji/

So I've decided to experiment a bit and see if it works on Discord.

It works! But only if you find a way to pass-through the image as-is through the CDN.

One of ways to do this is making it an APNG sticker.

import { DiscordSDK } from "@discord/embedded-app-sdk";
const SESSION_STORAGE_KEY = "__DISCORD_SDK_HACK__";
interface DiscordSDKAuthResponse {
access_token: string;
user: {
username: string;
discriminator: string;
id: string;
@alula
alula / Makefile
Created February 14, 2024 12:40
AES bruteforcer (incrementer version)
# Clang compiler is recommended. It does much better job at understanding and optimizing SIMD code.
all:
clang brute-inc.c -o brute-inc -O3 -Wall -lpthread -maes -march=native -msse2 -msse -msse4.1
clean:
rm brute-inc
./hashcat.bin -o result.txt hash.txt -a 3 mask.hcmask -S -w 3
// Original non-working mess fixed by alula
//
// The AES-NI code seems to be taken from https://gist.github.com/acapola/d5b940da024080dfaf5f
//
// DO NOT USE ORIGINAL MAKEFILE
// IT COMPILES WITHOUT OPTIMIZATIONS (THIS CODE ALSO REQUIRES SSE4.1)
//
// Compilation: (I recommend clang).
// clang brute.c -o brute -O3 -Wall -lpthread -maes -march=native -msse2 -msse -msse4.1
// If you prefer gcc:
@alula
alula / worker.js
Created October 16, 2023 17:34
GitLab merge request pinger Cloudflare Worker
// How to use:
// 1. Add IDs below
// 2. Deploy this on a cloudflare worker
// 3. Go to "Discord Notifications" GitLab integration settings.
// 4. Put the URL of the webhook, but with "discord.com" replaced with URL of your worker in
// "A merge request is created, merged, closed, or reopened" field and if you want to be
// pinged for comments, in "A comment is added" as well.
const discordIds = [
"219067402174988290", // alula
@alula
alula / keybase.md
Created September 5, 2023 23:55
keybase.md

Keybase proof

I hereby claim:

  • I am alula on github.
  • I am alulalol (https://keybase.io/alulalol) on keybase.
  • I have a public key ASDRfqgZ1mybxtBcIGXqGRxMteK9utMitRP8bEUtPP52xgo

To claim this, I am signing this object:

const fs = require("fs");
const zlib = require("zlib");
const args = process.argv.slice(2);
if (args.length < 1) {
console.error("Usage: node emkunpack.js <file>");
process.exit(1);
}
const data = fs.readFileSync(args[0]);
@alula
alula / gxgames.user.js
Last active July 30, 2023 23:12
GX.games bypass meme (UserScript edition)
// ==UserScript==
// @name GX.games bypass meme (UserScript edition)
// @description Piss poor way to bypass piss poor security through obscurity.
// @author https://github.com/alula
// @version 1
// @grant none
// @run-at document-start
// @match https://play.gxc.gg/*
// @match https://gxc.gg/*
// @match https://gx.games/*
module main
import math
[inline]
fn hm_next_power_of_two(_x i64) i64 {
if _x == 0 {
return 1
}