Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am dehora on github.
  • I am dehora (https://keybase.io/dehora) on keybase.
  • I have a public key ASCMcCHXvRlJKpB5ioCcRqJBvT0NT2XNZh4VR8JnJCnf0Qo

To claim this, I am signing this object:

@dehora
dehora / pydev_ipython_console_011.py
Created Apr 9, 2018
fix pycharm console start crash with anaconda
View pydev_ipython_console_011.py
subl /Users/bdehora/Library/Application\ Support/JetBrains/Toolbox/apps/PyCharm-P/ch-1/181.4445.28/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_ipython_console_011.py
class PyDevIPCompleter(IPCompleter):
def __init__(self, *args, **kwargs):
""" Create a Completer that reuses the advanced completion support of PyDev
in addition to the completion support provided by IPython """
IPCompleter.__init__(self, *args, **kwargs)
# Use PyDev for python matches, see getCompletions below
View DnsCache.scala
package services
import java.security.Security
import org.slf4j.LoggerFactory
object DnsCache {
private val logger = LoggerFactory.getLogger("DnsCache")
View StreamsMain.java
package spike;
import java.util.concurrent.TimeUnit;
import nakadi.Cursor;
import nakadi.LoggingStreamObserverProvider;
import nakadi.LoggingStreamOffsetObserver;
import nakadi.NakadiClient;
import nakadi.Response;
import nakadi.StreamConfiguration;
import nakadi.StreamProcessor;
@dehora
dehora / DateTimeSerdes.java
Last active Nov 8, 2016
Handle leap seconds with DateTimeFormatter
View DateTimeSerdes.java
package foo;
import java.time.Instant;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalQuery;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
View SubscriptionTest.java
package org.zalando.fahrschein.domain;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.ByteArrayOutputStream;
import java.util.Collections;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
View HeilmeierQuestions.md

HeilmeierQuestions

  • What are you trying to do? No jargon. What is the problem? Why is it hard?

  • How is it done today, and what are the limits of current practice?

  • What's new in your approach and why do you think it will be successful?

  • Who cares?

View kafka-msg.txt
RequestMessage
+---------------+---------------+---------------+---------------+
| Size (int32) |
+---------------+---------------+---------------+---------------+
| ApiKey (int16) | ApiVersion (int16) |
+---------------+---------------+---------------+---------------+
| CorrelationId (int32) |
+---------------+---------------+---------------+---------------+
| ClientId (str, 0..)
...
@dehora
dehora / http.py
Created Jun 17, 2016
BaseHTTPServer with cors
View http.py
#! /usr/bin/env python
from SimpleHTTPServer import SimpleHTTPRequestHandler
import BaseHTTPServer
class CORSRequestHandler (SimpleHTTPRequestHandler):
def end_headers (self):
self.send_header('Access-Control-Allow-Origin', '*')
SimpleHTTPRequestHandler.end_headers(self)
@dehora
dehora / swim.md
Last active Apr 20, 2020
SWIM protocol resources
View swim.md
You can’t perform that action at this time.