Skip to content

Instantly share code, notes, and snippets.

View Vladimir-Urik's full-sized avatar
:shipit:
Crazy factor

Vladimír Urík Vladimir-Urik

:shipit:
Crazy factor
View GitHub Profile
package cz.pvpcraft.gggedr.stats.common.utils;
public class ValidatorUtils {
public static boolean isInteger(String s) {
try {
Integer.parseInt(s);
} catch (NumberFormatException e) {
return false;
}
@kBULOSU
kBULOSU / WorldCuboid.java
Created October 21, 2021 06:58
CUBOID CLASS FOR KODY FUCKING SIMPSON
package com.redefantasy.core.spigot.misc.utils;
import lombok.*;
import net.minecraft.server.v1_8_R3.AxisAlignedBB;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
@Armster15
Armster15 / GetDiscordTokenFromConsole.js
Last active April 18, 2025 17:43
A script that, when copypasted in the Discord console, it gives you your Discord token
/*
This allows you to get your Discord token via the Discord console.
Why this method?
- Simpler, just copy paste the function and call it, no need to monitor and manually look for headers
- More accurate
- More visually appealing
This code is licensed under The Unlicense. For more information please visit https://unlicense.org/
@Aurelien30000
Aurelien30000 / README.md
Last active May 31, 2023 05:30 — forked from WeiiswurstDev/ScoreboardSign.java
A simple tool to manage scoreboards in minecraft (lines up to 48 characters !). This Fork uses ProtocolLib and is therefore compatible with 1.13.x - 1.16.x. To use it in your project, you need to use ProtocolLib as a dependency!

ScoreboardSign


# Read more about setting it up
# https://medium.com/@ljmocic/deploying-react-application-to-aws-s3-using-github-actions-85addacaeace
on:
push:
tags:
- '*'
jobs:
build:
@einyx
einyx / iptables.sh
Last active August 13, 2024 12:20
Anti DDos kernel settings
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###
@graywolf336
graywolf336 / BukkitSerialization.java
Last active February 16, 2025 15:51
Serialize and deserialize the player's inventory, including armor and content.
/**
* Converts the player inventory to a String array of Base64 strings. First string is the content and second string is the armor.
*
* @param playerInventory to turn into an array of strings.
* @return Array of strings: [ main content, armor content ]
* @throws IllegalStateException
*/
public static String[] playerInventoryToBase64(PlayerInventory playerInventory) throws IllegalStateException {
//get the main content part, this doesn't return the armor
String content = toBase64(playerInventory);