Skip to content

Instantly share code, notes, and snippets.


Joey Twister915

View GitHub Profile
use std::marker::PhantomData;
pub enum TopK<I, E, K, F, const N: usize> {
// this TopK has just been created and no data has been computed
// this is the initial state
Prepared {
itr: I,
f: F,
_k: PhantomData<K>,
View generics.go
package main
import (
type fanOutResult[K any, R any] struct {
Key K
Result R
package net.cogzmc.core.effect.npc;
import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.wrappers.WrappedDataWatcher;
import com.comphenix.protocol.wrappers.WrappedWatchableObject;
import lombok.*;
Twister915 / tmgapi.go
Last active Aug 29, 2015
The code that powers
View tmgapi.go
package main
import (
_ ""
_ ""

Keybase proof

I hereby claim:

  • I am Twister915 on github.
  • I am twister915 ( on keybase.
  • I have a public key whose fingerprint is A5AC 6BDF 416E CB5F F1F4 EFFE A712 40A0 57DD 27C2

To claim this, I am signing this object:

Twister915 / pom.xml
Last active Aug 29, 2015
Checks a list of servers (specified in a strange JSON format, checkout masscan for more details) for offline/online mode. Prints all online servers to stdout
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""
Twister915 / gist:2135ee1c4bf976739dbb
Created Oct 23, 2014
The assignment said to make at least three comments.
View gist:2135ee1c4bf976739dbb
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
public final class DigitToolsApplication extends Application {
public static void main(String[] args) {
new DigitToolsApplication().run();
Twister915 /
Last active Aug 29, 2015
Converts ores and squashes ingots into blocks, based strictly on bukkit stuff from line 22 down
import net.cogzmc.core.modular.command.CommandException;
import net.cogzmc.core.modular.command.ModuleCommand;
import net.cogzmc.core.player.CPlayer;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
Twister915 / gist:5b2b78a8614b2507aaf4
Created Jul 29, 2014
ShareX - custom uploader
View gist:5b2b78a8614b2507aaf4
"Name": "Puush",
"RequestType": "POST",
"RequestURL": "",
"FileFormName": "f",
"Arguments": {
"z": "poop"
"ResponseType": "Text",
Twister915 /
Created Jul 3, 2014
Here, have some cool code. Converts timespecs in the format of (3s4m24d4w) into seconds. Useful for punishment plugins!
package net.cogzmc.core.util;
import java.util.HashMap;
import java.util.Map;
public final class TimeUtils {
private static final Map<Character, Double> TIMEMAP = new HashMap<>();
static {
TIMEMAP.put('s', 1D);