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 / KENBOT-README.md
Created April 5, 2013 17:01
The KenBot README.md
@azenla
azenla / FlansModCrash.txt
Created April 11, 2013 21:42
Crash Report for Flans Mod
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Ticking entity
A full error report has been saved to /home/user/FlashDrive/MultiMC/instances/Flans Mod/minecraft/crash-reports/crash-2013-04-11_17.40.41-server.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash :(
@azenla
azenla / G+Login.html
Created April 13, 2013 16:34
Google+ Login
<!DOCTYPE html>
<html>
<head>
<title>Google+ Login</title>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/client:plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
@azenla
azenla / PircBotXErrorDCC.txt
Created April 14, 2013 22:11
PircBotX Error
/usr/lib/jvm/java-7-openjdk-amd64/bin/java -Didea.launcher.port=7532 -Didea.launcher.bin.path=/usr/idea/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar:/usr/lib/jvm/java-7-openjdk-amd64/lib/dt.jar:/usr/lib/jvm/java-7-openjdk-amd64/lib/sa-jdi.jar:/usr/lib/jvm/java-7-openjdk-amd64/lib/jconsole.jar:/home/user/IdeaProjects/IRC/KenBot/out/production/KenBot:/home/user/IdeaProjects/IRC/KenBot/lib/pircbotx.jar:/usr/idea/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain kaendfinger.kenbot.core.KenBot
1 module has been identified
Parse004: [KenBotDev, chaos.esper.net, charybdis-3.3.0, DQRSZagiloswz, CFILPQbcefgijklmnopqrstvz, bkloveqjfI]
<#kaendfinger> ** KenBotDev joined the channel
<#kaendfinger><kaendfinger> $help
java.lang.StringIndexOutOfBoundsException: String index out of range: 99
at java.lang.String.charAt(String.java:658)
at org.pircbotx.Utils.tokenizeLine(Utils.java:221)
at org.pircbotx.PircBotX.processServerResponse(PircBotX.java:1917)
at org.pircbotx.Pir
using System;
using System.Reflection;
using System.Collections.Generic;
namespace SharpIRC
{
public class EventRegistry {
public static Dictionary<string, MethodInfo> commandMethods = new Dictionary<string, MethodInfo> ();
public static void registerCommandClass(String className) {
Type t = Type.GetType (className);
@azenla
azenla / GDCIDHeloper.java
Created May 7, 2013 00:21
GCP ID Helper
package kaendfinger.gcpd;
import java.util.Random;
public class GCPDIDHelper {
public static void main(String[] args) {
System.out.println(createID());
}
@azenla
azenla / GroovyPower.groovy
Created May 16, 2013 01:10
GroovyPower Example
package jpower.groovy
class GroovyPower {
public static void main(String[] args) {
if (args.length<1) {
help();
System.exit(2);
}
println("Success!");
printSeconds();
@azenla
azenla / SimpleUpdate.java
Created May 16, 2013 01:18
Simple IP address getter using Java. Is automatically compiled by Jenkins on commits.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class PublicIPGetter {
public static void main(String[] args) throws IOException {
HttpURLConnection connection = (HttpURLConnection) new URL("http://bot.whatismyipaddress.com/").openConnection();
connection.connect();
@azenla
azenla / sha1sum.groovy
Created May 17, 2013 00:33
Groovy Script to calculate SHA1 Sums for HUGE files
import java.security.MessageDigest
int KB = 1024
int MB = 1024*KB
File f = new File(args[0])
if (!f.exists() || !f.isFile()) {
println "Invalid file $f provided"
println "Usage: groovy sha1.groovy <file_to_hash>"
}
@azenla
azenla / GCPHelper.java
Last active December 17, 2015 13:19
GCPHelper Class
package com.directmyfile.gcp.client.core;
import java.util.HashMap;
public class GCPLine {
private HashMap<String, String> properties;
private String command;
public GCPLine(String line) {
this.properties = new HashMap<String, String>();