Skip to content

Instantly share code, notes, and snippets.

package object kafka {
implicit class NicerCommittable(val underlying: Committable) extends AnyVal {
def commit(): Future[Done] = underlying.commitScaladsl()
}
}
;;; I prefer cmd key for meta
(setq mac-option-key-is-meta nil
mac-command-key-is-meta t
mac-command-modifier 'meta
mac-option-modifier 'none)
@dwestheide
dwestheide / about.md
Created April 13, 2012 06:17 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
/data/github/current/lib/github/config/resque.rb:27: undefined method `constantize' for "GitHub::Jobs::UpdateSolr":String (NoMethodError)
from /data/github/current/lib/github/config/resque.rb:26:in `each'
from /data/github/current/lib/github/config/resque.rb:26
from /data/github/current/lib/rock_queue.rb:9:in `require'
from /data/github/current/lib/rock_queue.rb:9
from hooks/post-upload-pack:11:in `require'
from hooks/post-upload-pack:11
@dwestheide
dwestheide / gist:1353058
Created November 9, 2011 21:15
Byte array support for Dispatch
def <<< (bytes: Array[Byte], content_type: String): Request = {
val e = new org.apache.http.entity.ByteArrayEntity(bytes)
e.setContentType(content_type)
PUT.copy(body = Some(e))
}
def << (bytes: Array[Byte], content_type: String): Request = {
val e = new org.apache.http.entity.ByteArrayEntity(bytes)
e.setContentType(content_type)
POST.copy(body = Some(e))
}