Skip to content

Instantly share code, notes, and snippets.

View joshbker's full-sized avatar

Josh joshbker

View GitHub Profile
@joshbker
joshbker / Example.svelte
Last active November 14, 2023 00:28
SvelteKit Tooltip (with Tailwind CSS)
<script lang="ts">
import Tooltip from "$lib/Tooltip.svelte";
import TooltipContent from "$lib/TooltipContent.svelte";
</script>
<Tooltip>
<TooltipContent>
<div class="bg-gray-500 rounded-lg py-2 px-3">
<p class="text-white">Tooltip</p>
</div>
@joshbker
joshbker / Searcher.java
Last active December 16, 2022 23:50
A searching algorithm to find the best lectures from a query string.
package gg.joshbaker.searcher;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.apache.commons.text.similarity.JaroWinklerDistance;
import java.io.IOException;
import java.nio.file.Files;
@joshbker
joshbker / Command.java
Last active January 10, 2022 00:17
JDA Command Framework (Slash Commands)
package com.learnspigot.bot.framework.command;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Command {