Skip to content

Instantly share code, notes, and snippets.

View AdrianRaFo's full-sized avatar
🐕

Adrian Ramirez Fornell AdrianRaFo

🐕
  • Spain
  • 09:22 (UTC +02:00)
View GitHub Profile
@AdrianRaFo
AdrianRaFo / Intellij setup.md
Last active February 6, 2023 21:45
IntelliJ IDEA Setup

Before starting

If you are a new user please change these settings from the All settings option in the Customize menu before creating or opening any project.

If you are not a new user, the settings marked with Per project setting need to be applied for the current project if opened and on each existing project through the IntelliJ >> Preferences menu option but also on the File >> Manage IDE settings >> Settings for new Projects

Another way to apply this changes is to close all projects(File >> Close all projects or File >> Close project if only one openned) and accessing the settings from the All settings option in the Customize menu but you may need to reimport all your existing projects.

Plugins

@AdrianRaFo
AdrianRaFo / logback.xml
Last active August 14, 2019 11:25
Minimal logback
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>true</withJansi>
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout name="simple_logger" class="ch.qos.logback.classic.PatternLayout">
<Pattern>
[%highlight(%level)] %msg%n
</Pattern>
import com.google.cloud.datastore.Entity.Builder
import com.google.cloud.datastore._
import scala.util.Random
object GCPAccess {
val datastore: Datastore = DatastoreOptions.getDefaultInstance.getService
val rnd = Random
@AdrianRaFo
AdrianRaFo / DynamicBatchedSource.scala
Last active February 21, 2018 13:39
Add elements to an Akka Streams dynamically and accumulate them in batches
import akka.actor.ActorSystem
import akka.stream.scaladsl.{Flow, Sink, Source}
import akka.stream.{ActorMaterializer, OverflowStrategy}
import scala.concurrent.duration._
import scala.io.StdIn
object DynamicBatchedSource extends App {
implicit val system: ActorSystem = ActorSystem("QuickStart")