Using a repo helps people contribute easier + has more visibility!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Unicode{ | |
public static boolean containsUnicode(String s){ | |
//you're welcome i did it for you :D | |
Pattern p = Pattern.compile("[^a-z0-9~!@#$%^&*()_+-={}\\[\\]|:\";'<>?,./\\\\ ]", Pattern.CASE_INSENSITIVE); | |
Matcher m = p.matcher(s); | |
return m.find(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.Getter; | |
import lombok.Setter; | |
import spark.ModelAndView; | |
import spark.template.velocity.VelocityTemplateEngine; | |
import java.util.HashMap; | |
@Getter | |
@Setter | |
public class VelocityTemplateBuilder { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public BoilerPlate(){ | |
JFrame frame = new JFrame(); | |
JPanel panel = new JPanel(); | |
frame.add(panel, BorderLayout.CENTER); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
frame.setTitle("title"); | |
try { | |
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); | |
} catch (ClassNotFoundException | UnsupportedLookAndFeelException | IllegalAccessException | InstantiationException e) { | |
e.printStackTrace(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# User-specific stuff | |
.idea/ | |
*.iml | |
*.ipr | |
*.iws | |
# IntelliJ | |
out/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ROTCipher { | |
private static final String ALPHABET = "abcdefghijklmnopqrstuvwxyz"; | |
public static String encode(String text,int rotations){ | |
String rotated = rotate(rotations); | |
rotated += rotated.toUpperCase(); | |
String alphabet = ALPHABET + ALPHABET.toUpperCase(); | |
StringBuilder sb = new StringBuilder(); | |
for (char c : text.toCharArray()) { | |
String s = c + ""; | |
if (s == " ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.octopvp.octocord.object; | |
import com.google.gson.annotations.SerializedName; | |
import lombok.Getter; | |
import lombok.RequiredArgsConstructor; | |
import lombok.Setter; | |
import net.dv8tion.jda.api.entities.User; | |
import net.dv8tion.jda.api.interactions.components.ActionRow; | |
import net.dv8tion.jda.api.interactions.components.Button; | |
import net.dv8tion.jda.api.interactions.components.Component; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.common.base.Preconditions; | |
import org.bukkit.Bukkit; | |
import org.bukkit.event.Event; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.EventPriority; | |
import org.bukkit.event.Listener; | |
import org.bukkit.plugin.Plugin; | |
import org.bukkit.plugin.java.JavaPlugin; | |
import java.lang.reflect.InvocationTargetException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
messages: # See https://docs.adventure.kyori.net/minimessage/format.html | |
claim-created: '<green>Claim created! Spawn block set to %1 %2 %3. You can change it by typing /setspawn.' | |
must-be-standing-in-claim: '<red>You must be standing in a claim!' | |
no-permission: '<red>You do not own this claim, or do not have permission to do that!' | |
teleporting: '<yellow>Teleporting in 5 seconds, don''t move...' | |
teleported: '<green>Teleported.' | |
moved: '<red>Pending teleportation request cancelled.' | |
damaged: '<red>Pending teleportation request cancelled.' | |
public-on: '<green>Your claim is now public!' # Add the '%1' placeholder for cost, if it is enabled. The placeholder system will be revamped in the future. | |
#For example: '<green>Your claim is now public!<red>-$%1.' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name DMOJ Question Copier | |
// @version 1.1 | |
// @author Badbird5907 | |
// @source https://gist.github.com/Badbird5907/7fd28dcda1c92d5393863743b23d26db | |
// @namespace badbird.dev | |
// @license MIT | |
// @description Adds a button to copy the current question to the clipboard on DMOJ problem pages. | |
// @match https://dmoj.ca/problem/* | |
// @grant GM_setClipboard |
OlderNewer