Skip to content

Instantly share code, notes, and snippets.

View volgar1x's full-sized avatar

Antoine Chauvin volgar1x

View GitHub Profile
heroku logs -n 5000 --app "$1" | grep router | grep -Po 'fwd="\K.*?(?=")' | uniq | wc -l
<div class="row">
<div class="col-md-8 col-md-offset-2">
<p class="lead">
<h1>Why subscribe ?</h1>
Because,!
</p>
</div>
</div>
defmodule AcmeApp.Flash do
import Plug.Conn
defmodule UnknownFlashException do
defexception key: nil
def message(exception), do: "unknown flash " <> inspect(exception.key)
end
defmodule Item do
case msg is InventoryContentMessage:
if(getQualifiedClassName(msg) != getQualifiedClassName(InventoryContentMessage))
{
return false;
}
icmsg = msg as InventoryContentMessage;
package org.heater.core.plugin;
import com.google.inject.AbstractModule;
import com.google.inject.multibindings.Multibinder;
import org.heater.api.HeaterActivator;
import java.util.ArrayList;
import java.util.List;
public class PluginManager {
module Main where
main = run tests where
run [] = putStrLn "no tests to run"
run [x] = x
run (x:xs) = x >> sep >> run xs
tests = [
myConcatTest,
concatManyTest,
DEBUG o.h.l.network.frontend.LoginClient - REGISTERED
DEBUG o.h.l.network.frontend.LoginClient - ACTIVE
DEBUG o.h.l.network.frontend.LoginClient - WRITE: org.heat.protocol.messages.ProtocolRequired@5e4e142a
DEBUG o.h.l.network.frontend.LoginClient - WRITE: org.heat.protocol.messages.HelloConnectMessage@71fe7596
DEBUG o.h.l.network.frontend.LoginClient - FLUSH
DEBUG o.h.l.network.frontend.LoginClient - RECEIVED: org.heat.protocol.messages.BasicPingMessage@6835c0b0
@volgar1x
volgar1x / main.rs
Last active August 29, 2015 13:59 — forked from Noxivs/main.rs
use std::io::net::ip::{Ipv4Addr, SocketAddr};
use std::io::net::tcp::{TcpListener, TcpStream};
use std::io::{Acceptor, Listener, IoResult};
struct Client {
stream: TcpStream
}
err.visit(AuthError.<NetworkCommand>visitor()
.alreadyConnected(it -> client.write(new IdentificationFailedMessage(
(byte) IdentificationFailureReasonEnum.TOO_MANY_ON_IP.value)))
.banned(it -> client.write(new IdentificationFailedBannedMessage(
(byte) IdentificationFailureReasonEnum.BANNED.value,
it.getEnd().toEpochMilli())))
.wrongCredentials(it -> client.write(new IdentificationFailedMessage(
(byte) IdentificationFailureReasonEnum.WRONG_CREDENTIALS.value)))
package org.heat.shared;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
import java.util.stream.Stream;
public interface Either<L, R> {
public static <L, R> Either<L, R> left(L left) { return left(left, null); }