Skip to content

Instantly share code, notes, and snippets.

View DonovanDMC's full-sized avatar
🦊
OwO - https://maidboye.cafe

Donovan Daniels DonovanDMC

🦊
OwO - https://maidboye.cafe
View GitHub Profile
// ==UserScript==
// @name Tag Type Highlight
// @namespace https://e621.net
// @version 1.0.0
// @description Hilights tags in e621 post verisons.
// @author Donovan_DMC
// @match https://e621.net/post_versions*
// @grant none
// ==/UserScript==
Nothing ⭐
class Snowflake {
static readonly BITS = {
EPOCH: 41,
MACHINE_ID: 10,
SEQUENCE: 12,
UNUSED: 1
};
static readonly EPOCH = Date.parse("2022-01-01T00:00:00.000Z");
static readonly MACHINE_ID = 0;
static readonly MAX_MACHINE_ID = Math.pow(2, Snowflake.BITS.MACHINE_ID);
@DonovanDMC
DonovanDMC / 📊 Weekly development breakdown
Last active September 3, 2021 18:04
📊 Weekly development breakdown
TypeScript 11 hrs 21 mins ████████████████▍░░░░ 78.4%
JSON 1 hr 53 mins ██▋░░░░░░░░░░░░░░░░░░ 13.1%
JavaScript 1 hr 3 mins █▌░░░░░░░░░░░░░░░░░░░ 7.3%
Markdown 10 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.2%
Other 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.0%
@DonovanDMC
DonovanDMC / ignore-bots.md
Last active May 8, 2019 19:39
Some snippets to help with ignoring bots.

Was your bot denied for responding to other bots? Try out some of these code snippets to help with that

Feel free to provide snippets that we can add to this list in the comments, or in #bfd on Discord.

Libraries Covered:

  • discljord (Clojure)
  • discordcr (Crystal)
  • Discord.Net (C#)
  • DSharpPlus (C#)
@DonovanDMC
DonovanDMC / FizzBuzz.js
Last active November 12, 2018 06:40
Fizz Buzz
// normal, static, somewhat-easy to maintain
for(let i=0;i<=100;i++) {
var str ="";
if(Number.isInteger(i/3)) str+="Fizz";
if(Number.isInteger(i/5)) str+="Buzz";
if(!str) str = i;
console.log(str);
}
// advanced, dynamic, easy to maintain