Skip to content

Instantly share code, notes, and snippets.

View volgar1x's full-sized avatar

Antoine Chauvin volgar1x

View GitHub Profile
package org.shivas.core;
import junit.framework.TestCase;
import java.lang.annotation.*;
import java.lang.reflect.Field;
import java.util.*;
public class Test extends TestCase {
package org.shivas.core.core.commands;
import org.shivas.common.params.Conditions;
import org.shivas.common.params.Parameters;
import org.shivas.common.params.Types;
import org.shivas.data.entity.ItemTemplate;
import org.shivas.protocol.client.formatters.ItemGameMessageFormatter;
import org.shivas.core.core.commands.types.ItemTemplateType;
import org.shivas.core.core.commands.types.PlayerType;
import org.shivas.core.core.logging.DofusLogger;
package org.shivas.core.config
import org.joda.time.Duration
import org.shivas.data.Containers
import org.shivas.data.entity.MapTemplate
import org.shivas.protocol.client.enums.FightTypeEnum
/**
* Created with IntelliJ IDEA.
* User: Blackrush
package org.mambo.protocol.client.io;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
/**
* Created with IntelliJ IDEA.
* User: Blackrush
* Date: 10/11/12
package org.mambo.protocol.client.io;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
/**
* Created with IntelliJ IDEA.
* User: Blackrush
package org.mambo.core;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.assistedinject.Assisted;
import org.junit.Test;
import java.lang.annotation.Annotation;
interface ManyNetworkHandlerFactory {
Set<NetworkHandler> create(NetworkClient client);
}
class NetworkHandlersModule extends AbstractModule {
protected void configure() {
install(new ManyFactoryModuleBuilder(NetworkClient.class)
.bind(AuthenticationHandler.class)
.build());
}
@volgar1x
volgar1x / gist:4132843
Created November 22, 2012 20:37
Dalesbred QueryBuilder enhancement
/*
* Copyright (c) 2012 Evident Solutions Oy
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
Error: Decrypt error - padding function returned null!
at com.hurlant.crypto.rsa::RSAKey/_decrypt()
at com.hurlant.crypto.rsa::RSAKey/verify()
at com.ankamagames.dofus.logic.connection.managers::AuthentificationManager/setPublicKey()
at com.ankamagames.dofus.logic.connection.frames::AuthentificationFrame/process()
at com.ankamagames.jerakine.messages::Worker/processMessage()
at com.ankamagames.jerakine.messages::Worker/processMessages()
at com.ankamagames.jerakine.messages::Worker/onEnterFrame()
def create
@errors = []
@user = User.authenticate(params[:username], params[:password])
respond_to do |format|
if @user.nil?
@errors << t("authentication_error")
format.html { render :new }
format.json { render json: @errors }