Skip to content

Instantly share code, notes, and snippets.

View azenla's full-sized avatar
🏳️‍⚧️
cabbit mode

Alex Zenla azenla

🏳️‍⚧️
cabbit mode
View GitHub Profile
@azenla
azenla / HelloWorld.java
Created September 24, 2012 07:12
Hello world
class HelloWorld {
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
@azenla
azenla / CommandDimension.java
Last active December 10, 2015 03:58
Dimension command
package kaendfinger.ForgeCommander.Commands;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
public class CommandDimension extends CommandBase
@azenla
azenla / CmdRegistry.java
Last active December 10, 2015 04:58
Command Registry for Forge Essentials
package com.ForgeEssentials.commands.util;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import com.ForgeEssentials.commands.CommandMotd;
public class CmdRegistry {
private static List<String> commands = new ArrayList<String>();
@azenla
azenla / OtherCommands.java
Last active December 15, 2015 14:19
OtherCommands
package kaendfinger.kenbot.module.text;
import com.google.gson.Gson;
import kaendfinger.kenbot.api.registry.Command;
import kaendfinger.kenbot.api.registry.EventListener;
import org.pircbotx.Channel;
import org.pircbotx.hooks.events.JoinEvent;
import org.pircbotx.hooks.events.MessageEvent;
import java.io.InputStream;
@azenla
azenla / VoicerException
Last active December 15, 2015 14:19
AutoVoicer Exception
Error: Unable to execute command autovoice
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at kaendfinger.kenbot.listeners.CommandListener.executeCommand(Unknown Source)
at kaendfinger.kenbot.listeners.CommandListener.onMessage(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
@azenla
azenla / Resolver.java
Created March 30, 2013 03:24
ShortURLResolver
@EventListener(name = "ShortURLResolver", event = "MessageEvent")
public static void shortUrlResolver(MessageEvent event) throws IOException {
if (event.getMessage().contains("http://goo.gl")) {
String googleurllink = "";
for (String url : pullLinks(event.getMessage())) {
if (url.startsWith("http://goo.gl/")) {
googleurllink = url;
}
}
HttpURLConnection connection = (HttpURLConnection) new URL(googleurllink).openConnection();
@azenla
azenla / RawParser.java
Last active December 15, 2015 17:29
RawParser PircBotX
package kenbot.module.allthemutils;
import org.pircbotx.PircBotX;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;
public class RawParser implements Runnable {
@azenla
azenla / KenBotJSON.json
Last active December 15, 2015 17:49
KenBot JSON API Output
{
"configuration": {
"server": "irc.esper.net",
"user": "KenBot",
"prefix": "$"
},
"channels": [
"#KenBot"
],
"timestamp": 1365022113945
@azenla
azenla / OverflowOfNickChanges.txt
Created April 4, 2013 00:52
Nick Changes Overflow!
-18TheKenBot- Nick Changes: frdmn changed to frdmn|afk, Evo-off changed to Evo, samrg473 changed to samrg472, samrg472 changed to CompilerError, Keridos_off changed to Keridos, Abrar|stream changed to AbrarSyed, kboy|BackFromSecretMission changed to kboy, Keridos changed to Keridos_off, Architech|off changed to Architech, Evo changed to Evo-off, frdmn|zZz changed to frdmn|afk, kboy|AwayOnSecretMission changed to kboy|BackFromSecretMission,
-18TheKenBot- arvisL changed to TarvisK, TheMike|Away changed to TheMike, Stary2001|food changed to Stary2001, Krenair|offline changed to Krenair, Kilobyte changed to Kilooff, TheMike changed to TheMike|Away, Abrar|streaming changed to ABrar|stream, frdmn|afk changed to frdmn, kboy|recording changed to kboy|FMCGltches, worldmc|off changed to worldmc, manmaed changed to manmaed[Off], Sway changed to Sway|Away, max96at_ changed to max96at, Sw
-18TheKenBot- hitech changed to Architech|off, ABrar|stream changed to Abrar|stream, kaendfinger[Away] changed to kaendfinger
@azenla
azenla / KENBOT-CORE-18.json
Created April 4, 2013 17:59
The JSON returned by Bamboo's result/{PLAN_KEY}-{BUILD_NUMBER}.json
{
"expand": "changes,metadata,plan,vcsRevisions,artifacts,comments,labels,jiraIssues,stages",
"link": {
"href": "http:\/\/ci.directmyfile.com\/rest\/api\/latest\/result\/KENBOT-CORE-18",
"rel": "self"
},
"plan": {
"shortName": "Core",
"shortKey": "CORE",
"type": "chain",