Skip to content

Instantly share code, notes, and snippets.

View MrPowerGamerBR's full-sized avatar
:shipit:
We facepalm, we shrug and we hack around it and never look back.

MrPowerGamerBR MrPowerGamerBR

:shipit:
We facepalm, we shrug and we hack around it and never look back.
View GitHub Profile
@MrPowerGamerBR
MrPowerGamerBR / ImageUtils.java
Created April 2, 2017 16:34
Write text in images (and wrap it if needed)
package com.mrpowergamerbr.loritta.utils;
import java.awt.FontMetrics;
import java.awt.Graphics;
public class ImageUtils {
/**
* Escreve um texto em um Graphics, fazendo wrap caso necessário
* @param text Texto
* @param startX X inicial
1. First, you spawn an armor stand
2. Then you spawn an shulker
3. Make the shulker ride the armor stand
4. Spawn another armor stand in the same location as the previous armor stand
5. Spawn a falling block
6. Make the falling block ride the previous armor stand
7. Success!
TL;DR: Armor Stands
@MrPowerGamerBR
MrPowerGamerBR / SunnyMercadoPago.java
Last active December 18, 2016 17:20
My own MercadoPago API implementation for Java, because the official one was using very old dependencies.
package com.mrpowergamerbr.sparklysunnyfunny.utils;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
@MrPowerGamerBR
MrPowerGamerBR / MercadoUtils.java
Created December 17, 2016 13:55
Small Gson wrapper (?) for MercadoPago's Java SDK. Only with payment wrapper atm.
package com.mrpowergamerbr.sparklysunnyfunny.utils;
import java.util.ArrayList;
import org.codehaus.jettison.json.JSONObject;
import com.google.gson.Gson;
import com.mercadopago.MP;
public class MercadoUtils {
{
"_id":ObjectId("58265119e4b0b2f5072ea68b"),
"owner":"xxryancallexx",
"fancyName":"§4§n§lxX§f§n§lRyanCalle§4§n§lXx§r",
"voters":[
"GameOver_HD",
"BigSmoke69",
"blokcedu",
"DaniellaMC",
"Loh209",
package com.mrpowergamerbr.sparklycore.utils.hologram;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
@MrPowerGamerBR
MrPowerGamerBR / Hologram.java
Last active November 18, 2016 00:02
RetroHolograms - A quick and simple Hologram API for Spigot 1.7.10 Protocol Hack (supports 1.7 and 1.8)
package com.mrpowergamerbr.sparklycore.utils.hologram;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
@MrPowerGamerBR
MrPowerGamerBR / shutup_proxy.sh
Created November 3, 2016 16:05
Block DeathBot proxy IPs with IP Tables
# SSL proxies
iptables -A INPUT -s 1.179.201.18 -j DROP
iptables -A INPUT -s 1.225.249.55 -j DROP
iptables -A INPUT -s 1.234.28.114 -j DROP
iptables -A INPUT -s 1.234.28.160 -j DROP
iptables -A INPUT -s 1.234.28.18 -j DROP
iptables -A INPUT -s 1.234.28.20 -j DROP
iptables -A INPUT -s 1.234.28.36 -j DROP
iptables -A INPUT -s 1.234.28.42 -j DROP
iptables -A INPUT -s 1.234.28.86 -j DROP
[
{
"name":"wow",
"spawn":{
"x":244.97182245909556,
"y":65.15814676123665,
"z":270.87419056377456,
"yaw":-182.99997,
"pitch":-6.299999,
"world":"world"
---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!
Time: 14/08/16 12:06
Description: Rendering item
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3934)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938)