Skip to content

Instantly share code, notes, and snippets.

View favna's full-sized avatar
🎯
Focusing on development

Jeroen Claassens favna

🎯
Focusing on development
View GitHub Profile
@favna
favna / streamable.md
Last active May 16, 2022 20:41
Streamable CURL Upload

A simple Bash command for using in WSL / Ubuntu / Debian to upload to Streamable

note: Copy part only configured for WSL (Windows Subsystem Linux), if you want to use this on Ubuntu / Debian change the second line to use xclip instead

Function will always output to the STDOUT

Add to ~/.bashrc / ~/.zshrc

# Upload to Streamable.com from command line
# Usage: streamupload /path/to/videofile

Keybase proof

I hereby claim:

  • I am favna on github.
  • I am favna (https://keybase.io/favna) on keybase.
  • I have a public key whose fingerprint is 9A00 CAB9 1EF2 C966 592D DE3C C097 0B4E 7293 B0A9

To claim this, I am signing this object:

@favna
favna / CustomSapphireClient.ts
Last active January 11, 2022 16:08
Custom Sapphire Client with TypeScript
import { isGuildMessage } from '#utils/common';
import { container, SapphireClient } from '@sapphire/framework';
import type { Message } from 'discord.js';
export class MyCustomClient extends SapphireClient {
public music: MusicManager;
public constructor() {
super({
caseInsensitiveCommands: true,
@favna
favna / 2-through-handler-instance-property.ts
Last active January 24, 2022 19:49
Subcommands for Sapphire Slash Command Proof of Concept code examples
import { ApplyOptions } from '@sapphire/decorators';
import { ApplicationCommandRegistry, ChatInputCommand } from '@sapphire/framework';
import { SubCommandGroupHandler } from '@sapphire/plugin-subcommands';
import type { CommandInteraction } from 'discord.js';
@ApplyOptions<SubCommandPluginCommand.Options>({
description:
"A Chat Input Command with SubCommand group and nested Subcommands using a required public property that's an instance of SubCommandGroupHandler"
})
export class SlashCommand extends SubCommandPluginCommand {
@favna
favna / subcommands-with-manager-property.ts
Last active April 10, 2022 20:45
[REVISION 2] Sapphire Subcommands v3 for framework v3
import type { Args, ChatInputCommand, MessageCommand } from '@sapphire/framework';
import {
ChatInputSubcommandGroupMappings,
ChatInputSubcommandMappings,
MessageSubcommandGroupMappings,
MessageSubcommandMappings,
SubCommand,
SubcommandMappingsArray
} from '@sapphire/plugin-subcommands';
import type { CommandInteraction, Message } from 'discord.js';
@favna
favna / query.graphql
Created June 24, 2022 07:22
GraphqlPokemon Teaser
fragment statsData on Stats {
hp
attack
defense
specialattack
specialdefense
speed
}
fragment evData on EvYields {
@favna
favna / yarn V3.md
Last active February 18, 2023 05:24
Switch to yarn V3 copypasta dump

Yarn v3 is new version of Yarn that we recommend switching to as Yarn v1 has been deprecated.

"But I don't see any update on [source]?"

That is correct. Yarn v3 is installed through Yarn itself. Your global toolchain is and will always remain to be Yarn v1, however, you configure Yarn v3 on a per-project basis. How? Simply write:

yarn set version berry

This will download the new Yarn v3 binary and put in .yarn/releases, you should push this to your Git repository. It will also create a .yarnrc.yml file which configures the path which you should also commit.