Skip to content

Instantly share code, notes, and snippets.


Aaron Mast amast09

View GitHub Profile
View TradeBot.scala
import scala.concurrent.Future
import{ActorMaterializer, KillSwitch, KillSwitches, ThrottleMode}
import{Keep, Sink, Source}
import scala.concurrent.duration._
import scala.util.Random
final case class StockQuote(symbol: String, price: Int)
amast09 / async-examples.js
Created Oct 2, 2017
Examples referenced in async js blog post
View async-examples.js
// `series` Method Example
function eatFreeBread (bread, callback) {
setTimeout(function () {
console.log('Just ate some ' + bread + ' bread');
callback(null, {breadRating: 8});
}, 3000);
amast09 / ForComprehensions.scala
Last active Jul 30, 2017
Advanced Scala for comprehensions
View ForComprehensions.scala
import scala.concurrent.Future
import scala.concurrent.Await
import scala.concurrent.duration._
import java.util.Calendar
case class Movie(name: String, year: Int, rating: BigDecimal, directorId: Int)
case class Director(id: Int, name: String, yearBorn: Int)