Skip to content

Instantly share code, notes, and snippets.

View aetheryx's full-sized avatar
🎯
Focusing

Zain aetheryx

🎯
Focusing
View GitHub Profile
const SEED: u32 = u32::from_be_bytes(*b"CUM.");
const MAX_PENIS_LENGTH: u32 = 25;
fn calculate_penis_length(id: UserId) -> Result<usize, Error> {
/*
* How this function works:
* Discord snowflakes (user IDs) are 64 bit integers, with certain bit ranges dedicated to certain values
* (see https://discord.com/developers/docs/reference#snowflakes-snowflake-id-format-structure-left-to-right)
* Some of these values (especially towards the LSB) are very biased, which is why `id % n` is not a uniform hash.
* The 42 most significant bits of the snowflake contain the timestamp (milliseconds with epoch), which is the
@aetheryx
aetheryx / index.js
Last active May 2, 2020 14:24
arctis-7-tasmota; a small application to map the ChatMix slider on the SteelSeries Arctis 7 to a smart bulb running Tasmota (https://youtu.be/X5MLXNftdC4)
const HID = require('node-hid');
const mqtt = require('mqtt');
const config = {
/**
* The amount of times (per second) your headset gets polled.
* Higher = smoother, but more battery-hungry.
* In my experience setting this higher than 100 will cause your headset, Windows, or both to shit themselves.
*/
pollingRate: 10,
@aetheryx
aetheryx / _instructions.txt
Last active October 5, 2018 13:06
Re-enabling pinch to zoom on Discord Canary
Find the directory for the `Local` instance of your Discord client, e.g. `AppData\Local\DiscordCanary\app-0.0.214`.
Make a directory called `app` in the `resources` directory, e.g. `AppData\Local\DiscordCanary\app-0.0.214\resources\app`.
Paste the `index.js`, `inject.js` and `package.json` files into the `app` directory you just made.
Restart your client.
Credits to Kura for helping me figure this out :)
@aetheryx
aetheryx / script.js
Created June 4, 2018 03:44
Khan Academy ProcessingJS opdracht voor HVA-SKC
// De tafel
background(186, 145, 20);
// Het bord
ellipse(200, 200, 350, 350);
ellipse(200, 200, 300, 300);
// De dikte van onze frieten
strokeWeight(5);
@aetheryx
aetheryx / facts.json
Last active July 16, 2022 21:45
Cat Facts in JSON
[
"A 2007 Gallup poll revealed that both men and women were equally likely to own a cat.",
"A cat almost never meows at another cat, mostly just humans. Cats typically will spit, purr, and hiss at other cats.",
"A cat called Dusty has the known record for the most kittens. She had more than 420 kittens in her lifetime.",
"A cat can jump 5 times as high as it is tall.",
"A cat can jump up to five times its own height in a single bound.",
"A cat can spend five or more hours a day grooming himself.",
"A cat can sprint at about thirty-one miles per hour.",
"A cat can travel at a top speed of approximately 31 mph (49 km) over a short distance.",
"A cat cannot see directly under its nose.",
@aetheryx
aetheryx / poly.js
Created October 15, 2017 00:33
Map.filter polyfill
Object.defineProperty(Map.prototype, 'filter', {
value: function (filterFunction) {
const myMap = new Map();
for (const [key, value] of this) {
if (filterFunction(value, key, this)) {
myMap.set(key, value);
}
}
return myMap;
}
### Keybase proof
I hereby claim:
* I am aetheryx on github.
* I am aetheryx (https://keybase.io/aetheryx) on keybase.
* I have a public key whose fingerprint is F039 87D4 CF85 3B20 77A4 AC4A 7F8A FDAD A35B 54CB
To claim this, I am signing this object:
@aetheryx
aetheryx / custom.html
Last active August 24, 2017 19:01
RemindMe page
<style>
body {
background: linear-gradient(-45deg, #6495ed, #fa8072) no-repeat center center fixed;
background-size: 170% 170%;
-webkit-animation: background 19s ease infinite;
-moz-animation: background 19s ease infinite;
-o-animation: background 19s ease infinite;
animation: background 19s ease infinite;
}