This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Licensed under the Apache License, Version 2.0 | |
# Adapted from https://github.com/paulp/psp-std/blob/master/bin/test | |
runTests () { | |
sbt test || exit 1 | |
echo "[info] $(date) - finished sbt test" | |
} | |
stripTerminalEscapeCodes () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'scala' | |
// For those using Eclipse or IntelliJ IDEA | |
apply plugin: 'eclipse' | |
apply plugin: 'idea' | |
def findPlay20(){ | |
def pathEnvName = ['PATH', 'Path'].find{ System.getenv()[it] != null } | |
for(path in System.getenv()[pathEnvName].split(File.pathSeparator)){ | |
for(playExec in ['play.bat', 'play.sh', 'play']){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.upf.bg.condel.calc | |
import org.apache.spark.{ SparkConf, SparkContext} | |
import org.apache.spark.SparkContext._ | |
import org.apache.hadoop.conf.Configuration | |
import org.bson.BSONObject | |
import org.bson.BasicBSONObject | |
import org.json4s._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream backend { | |
server 127.0.0.1:5000; | |
} | |
server { | |
listen 80; | |
server_name my_site.localhost.com; | |
set $static /home/taar/git/MySite/my_site/admin/static; | |
root $static; | |
keepalive_timeout 60; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mesosphere.mesos.util.FrameworkInfo | |
import org.apache.mesos.MesosSchedulerDriver | |
/** | |
* @author Tobi Knaup | |
*/ | |
object Main extends App { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pulsar import arbiter, command | |
names = ['john', 'luca', 'carl', 'jo', 'alex'] | |
@command() | |
def greetme(request, message): | |
echo = 'Hello {}!'.format(message['name']) | |
request.actor.logger.info(echo) | |
return echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ROType(type): | |
def __new__(mcl, classname, bases, classdict): | |
class UniqueROType (mcl): | |
pass | |
def getAttrFromMetaclass(attr): | |
return lambda cls: getattr(cls.__metaclass__, attr, None) | |
for attr, value in classdict.items(): | |
if not hasattr(value, '__call__') and attr.startswith('_') and not attr.startswith('__'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted to Scala 2.10+ from | |
// | |
// http://daily-scala.blogspot.ie/2010/01/overcoming-type-erasure-in-matching-1.html | |
// | |
import scala.reflect.runtime.universe._ | |
class Def[C](implicit desired: TypeTag[C]) { | |
def unapply[X](c: X)(implicit m: TypeTag[X]): Option[C] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docker compose to have Zookeeper, Kafka, and Kafka Manager running for development. | |
zookeeper: | |
image: confluent/zookeeper | |
ports: | |
- "2181:2181" | |
kafka: | |
# My PR to update to 0.9.0.1 has been already merged, so very soon it will be possible | |
# to replace my kafka fork by the original one **wurstmeister/kafka:0.9.0.1** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javaOptions in run ++= Seq( | |
"-Xms128m" | |
, "-Xmx1024m" | |
// , "-Djava.library.path=./target/native" | |
) | |
// Akka dependencies | |
libraryDependencies ++= { | |
val akkaVersion = "2.4.1" | |
val akkaHttpVersion = "2.4.2-RC2" |
OlderNewer