This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
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)) | |
} |
/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 |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
;;; 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) |
package object kafka { | |
implicit class NicerCommittable(val underlying: Committable) extends AnyVal { | |
def commit(): Future[Done] = underlying.commitScaladsl() | |
} | |
} |