Skip to content

Instantly share code, notes, and snippets.

View enp's full-sized avatar

Eugene Prokopiev enp

View GitHub Profile
@enp
enp / AsyncHttpApp.java
Last active August 29, 2015 14:13
HTTP clients perfomance
public class AsyncHttpApp {
ExecutorService pool = Executors.newFixedThreadPool(25);
private interface Provider {
public void provide(String url, int times) throws Exception;
}
private class PlainProvider implements Provider {
public void provide(final String url, int times) throws Exception {
@enp
enp / service.py
Last active January 19, 2019 20:50
#!/usr/bin/env python3
import asyncio
from aiohttp import web
from switchio import Client, EventLoop
class CallServer:
def __init__(self, loop, host):
events = EventLoop(host=host, loop=loop)
@enp
enp / k8s.groovy
Created February 2, 2021 13:30
Watch k8s events in groovy script
#!/usr/bin/env groovy
@Grab('org.slf4j:slf4j-simple:[1,)')
import groovy.util.logging.*
@Grab('io.fabric8:kubernetes-client:[4,)')
import io.fabric8.kubernetes.client.*
import io.fabric8.kubernetes.api.model.*
@Slf4j