- highscalability
- the new stack
- fly.io blog
- datadog blog
- changelog.com
- https://www.kai-waehner.de/
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
describe('should navigate repeated customer ', () => { | |
let scope, ctrl, state, rootScope, fakeProfileService, sandbox, $provide, $controller; | |
beforeEach(module('rootApp')); | |
afterEach(() => sandbox.restore()); | |
beforeEach(() => module('rootApp', function(_$provide_) { | |
$provide = _$provide_; |
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
class Recommender(transactionModel: SasquatchTransactionModel)(implicit ec: ExecutionContext) extends StrictLogging { | |
def findCheaperMerchant(transaction: SasquatchTransactionDTO): DBRead[Seq[SasquatchRecommendation]] = { | |
val mId: String = transaction.merchantId | |
logger.info(s"Computing cheaper merchant for transaction: ${transaction.extId} merchant: ${mId}") | |
val top10NearestMerchants = transactionModel.nearestNeighbour( | |
long = transaction.long, | |
lat = transaction.lat, | |
category = transaction.category |
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 akka.actor.ActorDSL._ | |
import akka.actor.ActorSystem | |
// need an actor system, make it implicit to it's used by all our repl based actors | |
implicit val system = ActorSystem("demo") | |
// here's a simple example of creating an actor | |
// Also, this will give us a simple actor that is used to print the | |
// results sent back to us from the other actors. | |
val a = actor(new Act { |
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 spray.json._ | |
object MyJsonProtocol extends DefaultJsonProtocol { | |
implicit object MetricJsonFormatDouble extends RootJsonFormat[Metric[Double]] { | |
def write(c: Metric[Double]) = JsObject() | |
def read(value: JsValue) = value.asJsObject.getFields("total", "ok", "ko") match { | |
case Seq(JsString(total), JsString(ok), JsString(ko)) => | |
Metric[Double](total.toDouble, ok.toDouble, ko.replace("-", "0").toDouble) |
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
1. | |
brew install ruby | |
brew info ruby | |
2. | |
#Add this line to your .profile (or .bash_profile, .bashrc, .zshrc, etc): | |
export PATH=/usr/local/opt/ruby/bin:$PATH | |
#restart terminal | |
3. | |
gem install jekyll |
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
1. | |
brew install boot2docker | |
brew install docker | |
echo "export DOCKER_HOST=tcp://127.0.0.1:4243" >>~/.bash_profile | |
2. | |
boot2docker init #once init virtualbox vm | |
VBoxManage modifyvm "boot2docker-vm" --natpf1 "tcp-port$27017,tcp,,27017,,27017"; | |
3. |
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
mkdir heroku | |
cd heroku/ | |
virtualenv --no-site-packages env | |
source env/bin/activate | |
pip install bottle gevent | |
pip freeze > requirements.txt | |
cat >app.py <<EOF | |
import bottle | |
import os |