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
#!/bin/sh | |
echo Install all AppStore Apps at first! | |
# If you are looking into a solution to automate AppStore installs, | |
# check mas https://github.com/argon/mas | |
# I installed XCode, Forklift. | |
read -p "Press any key to continue... " -n1 -s | |
echo '\n' | |
# Install Homebrew |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq.Expressions; | |
using GraphQL; | |
using GraphQL.Builders; | |
using GraphQL.Resolvers; | |
using GraphQL.Types; | |
using LanguageExt; | |
using static LanguageExt.Prelude; |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Net; | |
namespace EventStoreService | |
{ | |
public class EventStoreService | |
{ |
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
name := "eff-study" | |
version := "1.0" | |
scalaVersion := "2.12.1" | |
scalacOptions ++= Seq( | |
"-Ypartial-unification", | |
"-language:postfixOps", | |
"-language:implicitConversions", | |
"-language:higherKinds" | |
) |
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 com.company | |
import akka.actor.ActorSystem | |
import akka.http.scaladsl.model.StatusCodes._ | |
import akka.http.scaladsl.model.Uri | |
import akka.util.Timeout | |
import com.company.Crawler.Destination | |
import com.company.model.AliasRequest | |
import scala.concurrent.duration._ |
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
private static ActorSystem CreateActorSystem(string systemName) | |
{ | |
var config = ConfigurationFactory.Load() | |
.WithFallback(CustomConfig.Create(systemName)) | |
.WithFallback(ClusterSingletonManager.DefaultConfig()) | |
.WithFallback(RedisPersistence.DefaultConfig()); | |
var path = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "akka.generated.conf")); | |
File.WriteAllText(path, config.ToString(true)); |
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
object Protocol extends TopicOneSupport with TopicTwoSupport { | |
/*can't be sealed now*/ trait PMessage | |
} |
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 com.company.macros | |
import scala.reflect.macros.blackbox | |
class ADTMacros(val c: blackbox.Context) { | |
import c.universe._ | |
def customSerializer[T: c.WeakTypeTag]: Tree = { | |
generate[T] { (tpe, symbols) => |
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 com.company.serialization | |
import java.nio.ByteBuffer | |
import java.nio.charset.Charset | |
import akka.actor.{ActorRef, ExtendedActorSystem} | |
import akka.persistence.PersistentRepr | |
import akka.persistence.eventstore.EventStoreSerializer | |
import akka.persistence.eventstore.snapshot.EventStoreSnapshotStore.SnapshotEvent | |
import akka.persistence.journal.Tagged |
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 scala.concurrent.{ExecutionContext, Future} | |
import scala.concurrent.ExecutionContext.Implicits.global | |
object ModelReaders { | |
implicit object UserReader extends ModelReader[User] { | |
def read(repo: Repo, id: Int) = repo.getUser(id) | |
} | |
implicit object RoomReader extends ModelReader[Room] { | |
def read(repo: Repo, id: Int): Future[Option[Room]] = repo.getRoom(id) | |
} |