Skip to content

Instantly share code, notes, and snippets.

Avatar

Maciej Ciołek maciekciolek

View GitHub Profile
View ConnectionCoordinator.scala
package vectos.kafka.akkaimpl.producer
import akka.Done
import akka.actor._
import akka.pattern.{ask, pipe}
import akka.util.Timeout
import vectos.kafka.akkaimpl.KafkaConnection
import vectos.kafka.types.v0._
import scala.concurrent.duration._
View gist:96c1f19071cd0da7a93dcaa3eafc3979
package vectos.kafka.akkaimpl.producer
import akka.Done
import akka.actor._
import akka.pattern.{ask, pipe}
import akka.util.Timeout
import vectos.kafka.akkaimpl.KafkaConnection
import vectos.kafka.types.v0._
import scala.concurrent.duration._
View gist:c645e28cc708b26177eb1444d077d09a
import java.nio.ByteBuffer
import java.util.concurrent.TimeUnit
import org.apache.kafka.clients._
import org.apache.kafka.common.metrics.{MetricConfig, Metrics, MetricsReporter}
import org.apache.kafka.common.network.Selector
import org.apache.kafka.common.protocol.ApiKeys
import org.apache.kafka.common.record.{CompressionType, MemoryRecords}
import org.apache.kafka.common.requests.{ProduceRequest, RequestSend}
import org.apache.kafka.common.utils.SystemTime
View gist:dbceccc4a57326eed091
I, [2015-06-09T12:22:23.823104 #1] INFO -- : Started POST "/api/events" for 172.17.42.1 at 2015-06-09 12:22:23 +0000
I, [2015-06-09T12:22:23.824772 #1] INFO -- : Processing by EventsController#create as JSON
I, [2015-06-09T12:22:23.824911 #1] INFO -- : Parameters: {"meetup_link"=>"http://www.meetup.com/KrakowJS/events/222453296/", "twitter_tag"=>"alamakota", "event"=>{"twitter_tag"=>"alamakota"}}
D, [2015-06-09T12:22:23.977603 #1] DEBUG -- : User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."facebook_id" = $1 LIMIT 1 [["facebook_id", "814144428671048"]]
I, [2015-06-09T12:22:24.204391 #1] INFO -- : Completed 404 Not Found in 379ms (ActiveRecord: 0.6ms)
View gist:497ec99ef7ec35ab0ead
vm.upload = function (files) {
if (files && files.length) {
for (var i = 0; i < files.length; i++) {
var file = files[i];
Upload.upload({
url: 'TU MU URLA WKLEJ',
file: file
}).error(function (evt) {
//TU jest kupa
}).success(function (data, status, headers, config) {