This file contains hidden or 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
| val consumer = new KafkaConsumer[String, String](consumerProperties) | |
| consumer.subscribe(List("input").asJava) | |
| val producer = new KafkaProducer[String, String](producerProperties) | |
| Future { | |
| while (true) { | |
| val records = consumer.poll(100) |
This file contains hidden or 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
| # aliases http://explainshell.com/explain?cmd=du+-sh+* | |
| ## admin | |
| alias wojda_show_directories_size="du -sh --total *" | |
| alias wojda_show_directories_size_sorted="du -sk *| sort -rn" | |
| alias wojda_show_disk_usage="df -h --total" | |
| alias wojda_whereis="whereis" | |
| alias wojda_export_variable="export var_name=var_value" | |
| alias wojda_show_all_envarionment_var="env" |
This file contains hidden or 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.danielwojda | |
| import akka.actor.{ActorSystem, Props} | |
| import akka.persistence.PersistentActor | |
| object Main { | |
| def main(args: Array[String]) { | |
| val system = ActorSystem("example") | |
| val actor = system.actorOf(Props(classOf[ProducerActor], "old instance")) |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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 scala.language.dynamics | |
| class MyDynamicClass extends Dynamic { | |
| private val fields = scala.collection.mutable.Map("foo" -> "1", "bar" -> 2) | |
| def selectDynamic(fieldName: String) = fields.get(fieldName) | |
| def addField(field: (String, String)) = fields += field | |
| } | |
| val dynamic = new MyDynamicClass() | |
| dynamic.foo | |
| dynamic.addField("wtf" -> "THIS IS SCALA!") |
This file contains hidden or 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
| SELECT table_name, table_rows | |
| FROM INFORMATION_SCHEMA.TABLES | |
| WHERE TABLE_SCHEMA = 'schem_name'; |
This file contains hidden or 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
| +Navigation | |
| * https://medium.com/@andrey_cheptsov/top-20-navigation-features-in-intellij-idea-ed8c17075880 |
This file contains hidden or 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
| * http://scalakata.com/index | |
| * https://github.com/lauris/awesome-scala | |
| * https://github.com/scalatron/scalatron/blob/master/Scalatron/doc/markdown/Scalatron%20Tutorial.md | |
| //Video | |
| * https://skillsmatter.com/conferences/1948-scala-exchange-2014#skillscasts | |
| * "Code Reviews Gems" - https://skillsmatter.com/skillscasts/5848-code-reviews-gems | |
| * "Cake Pattern: The Bakery from the Black Lagoon" [https://www.youtube.com/watch?v=yLbdw06tKPQ] | |
| //Blog |
This file contains hidden or 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
| wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz | |
| tar -zxf jdk-8u25-linux-x64.tar.gz | |
| export PATH=$OPENSHIFT_DATA_DIR/jdk1.8.0_25/bin:$PATH | |
| export JAVA_HOME="$OPENSHIFT_DATA_DIR/jdk/jdk1.8.0_25" |
NewerOlder