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 ConfigManagerOrWhatever { | |
| public ConfigManagerOrWhatever(ConfigTemplate template) { | |
| //RealFile.addnode(template.template()) or whatever this actually looks like in configurate | |
| } | |
| } | |
| // The rest of the methods required for fetching options or whatever. |
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 String getNode(String... path) { | |
| String token = ""; | |
| try { | |
| token = configNode.getNode(path).getString(); | |
| } catch (NullPointerException e) { | |
| e.printStackTrace(); | |
| } | |
| return token; | |
| } |
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 CommonConfig { | |
| CommentedConfigurationNode addDefault(CommentedConfigurationNode node) { | |
| //default config options | |
| return node; | |
| } | |
| } | |
| // This could also be static to avoid creating instances. probably would be better. |
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
| private static Logger initLogger() { | |
| try { | |
| logger = Logger.getLogger("EasyLogger"); | |
| File logFolder = new File(dataFolder.toFile(), "Logs"); | |
| if (!logFolder.exists()) | |
| logFolder.mkdirs(); | |
| File logFile = new File(logFolder, new SimpleDateFormat("MM-dd-yyyy").format(Calendar.getInstance().getTime()) + ".log"); | |
| if (!logFile.exists()) | |
| logFile.createNewFile(); |
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 NodeParams { | |
| public NodeParams(CommentedConfigurationNode parent, Object value, String comment, Object... path) { | |
| if (parent.getNode(path).isVirtual()) | |
| parent.getNode(path).setValue(value).setComment(comment); | |
| } | |
| public class Builder { | |
| private final CommentedConfigurationNode parent; | |
| private Object[] path; | |
| private Object value; |
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 uk.co.netbans.netbans.Config; | |
| import ninja.leaping.configurate.commented.CommentedConfigurationNode; | |
| import ninja.leaping.configurate.hocon.HoconConfigurationLoader; | |
| import ninja.leaping.configurate.loader.ConfigurationLoader; | |
| import org.slf4j.Logger; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.nio.file.Path; |
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 ca.yomnetwork.skills.command.subcommand.boost; | |
| import ca.yomnetwork.skills.Util; | |
| import ca.yomnetwork.skills.command.SubCommand; | |
| import ca.yomnetwork.skills.core.BoostModule; | |
| import org.bukkit.command.CommandSender; | |
| import org.bukkit.configuration.file.FileConfiguration; | |
| import org.bukkit.entity.Player; | |
| import java.util.HashSet; |
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 example | |
| fun main() { | |
| //PP.IF yes | |
| println("This should print") | |
| //PP.ENDIF | |
| //PP.IF skipPrint | |
| println("This should not.") | |
| //PP.ENDIF |
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
| const fetch = require('node-fetch'); | |
| (async () => { | |
| let min = 1000000000000000000000; | |
| let max = 0; | |
| for (let j = 0; j < 100; j++) { | |
| await fetch('http://localhost:4001/v1/balances', { | |
| headers: { | |
| 'X-Algo-API-Token': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' | |
| } |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Title</title> | |
| <style> | |
| .terminal div { | |
| max-height: 500px; | |
| overflow-y: scroll; |
OlderNewer