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
| local internet = require("internet") | |
| local M = {}; | |
| function M.sendMetric(metric, tags, values) | |
| local handle = internet.request( | |
| "http://localhost:8086/api/v2/write?org=netblock&bucket=minecraft", | |
| lineProtocol(metric, tags, values), | |
| { Authorization = "Token <redacted>" }, | |
| "POST" | |
| ) |
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
| //This is a normal jar with no classifier | |
| function normalJar(r) { | |
| //Getting the maven artifacts from the url. Note for this code to be even run in the first place, | |
| //the url has to match a regex pattern, meaning I don't need to worry about index out of bound issues. | |
| var split = r.uri.split('\/') | |
| var identifier = split[3] | |
| var id = split[4] | |
| var lastIdx = identifier.lastIndexOf('-'); | |
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
| dependencies { | |
| compile "curse.maven:jei:2724420" | |
| } |
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
| repositories { | |
| maven { | |
| url = "https://www.cursemaven.com" | |
| } | |
| } |
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 os | |
| import re | |
| filename = "client" | |
| data = open(filename + ".txt").read() #Or server.txt | |
| lines = data.splitlines() | |
| current_line, counter, deobf2obf = 0, 0, {} | |
| 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
| import net.minecraft.client.Minecraft; | |
| import net.minecraft.client.renderer.BufferBuilder; | |
| import net.minecraft.client.renderer.GlStateManager; | |
| import net.minecraft.client.renderer.Tessellator; | |
| import net.minecraft.client.renderer.vertex.DefaultVertexFormats; | |
| import net.minecraft.entity.Entity; | |
| import net.minecraftforge.client.event.RenderWorldLastEvent; | |
| import net.minecraftforge.fml.common.Mod; | |
| import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | |
| import org.lwjgl.opengl.GL11; |
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
| extern crate array_init; | |
| use std::*; | |
| static SEPARATOR: &str = "----|"; | |
| fn main() { | |
| let mut reader = InputReader::new(String::from("(2+1)*3")); | |
| let t = Expression::new(&mut reader, false); | |
| println!("{}", t.get_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
| extern crate piston_window; | |
| extern crate rand; | |
| extern crate array_init; | |
| extern crate hsl; | |
| use piston_window::*; | |
| use rand::Rng; | |
| use hsl::*; | |
| const CUBE_SIZE: i32 = 100; |
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
| extern crate piston_window; | |
| extern crate rand; | |
| extern crate array_init; | |
| use piston_window::*; | |
| use rand::Rng; | |
| const CUBE_SIZE: i32 = 100; | |
| const NUM_CUBES: usize = 8; |
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 void drawBox(int x, int y, int width, int height, int borderSize, int insideColor, int borderColor) { | |
| Gui.drawRect(x, y, x + width, y + height, insideColor); | |
| Gui.drawRect(x, y, x + width, y + borderSize, borderColor);//Top | |
| Gui.drawRect(x, y + height, x + width, y + height - borderSize, borderColor);//Bottom | |
| Gui.drawRect(x, y, x + borderSize, y + height, borderColor);//Left | |
| Gui.drawRect(x + width, y, x + width - borderSize, y + height, borderColor);//Right | |
| } |
NewerOlder