Skip to content

Instantly share code, notes, and snippets.

View strobe's full-sized avatar

strobe strobe

View GitHub Profile
@strobe
strobe / it-tests.log
Created April 1, 2017 11:22
ensime tests logs
[info] Loading global plugins from /Users/evgeniy/.sbt/0.13/plugins/project
[info] Loading global plugins from /Users/evgeniy/.sbt/0.13/plugins
[info] Loading project definition from /Users/evgeniy/Dropbox/dev/12_scala/01_Exploation/ensime-server/project
[info] Resolving key references (12318 settings) ...
[info] Set current project to ensime (in build file:/Users/evgeniy/Dropbox/dev/12_scala/01_Exploation/ensime-server/)
[info] Setting version to 2.11.8
[info] Reapplying settings...
[info] Set current project to ensime (in build file:/Users/evgeniy/Dropbox/dev/12_scala/01_Exploation/ensime-server/)
[info] ImplicitAnalyzerSpec:
[info] ImplicitAnalyzer
@strobe
strobe / ramdisk-create.sh
Last active April 21, 2017 02:43
ensime-server tests script
#!/bin/bash
diskutil erasevolume HFS+ 'ramdisk' `hdiutil attach -nomount ram://8388608`
@strobe
strobe / iperf w docker
Created June 30, 2016 04:22
iperf on azure
docker logs 80e086681cf5
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 172.17.0.2 port 5001 connected with 10.0.0.5 port 35326
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.7 sec 11.8 MBytes 9.21 Mbits/sec
[ 5] local 172.17.0.2 port 5001 connected with 10.0.0.5 port 35334
[ 5] 0.0-10.2 sec 11.6 MBytes 9.53 Mbits/sec
{
"id": "vip-hello",
"cmd": null,
"cpus": 0.1,
"mem": 64,
"disk": 0,
"instances": 1,
"container": {
"type": "DOCKER",
"volumes": [],
@strobe
strobe / cassandra-group.json
Last active June 13, 2016 22:32
DCOS Marathon Multi-node Docker-Cassandra
{
"id": "/cassandra",
"groups": [
{
"id": "/cassandra/cassandra-seed-group",
"apps": [
{
"id": "/cassandra/cassandra-seed-group/cassandra1",
"cmd": null,
"cpus": 0.5,
@strobe
strobe / build.sbt
Created April 14, 2016 02:15
SBT TIPS
// explicitly set up plugin scala version
libraryDependencies += sbtPluginExtra(
m = "com.x" % "sbt-x" % "1.5.1", // Plugin module name and version
sbtV = "0.13.11",
scalaV = "2.11.8" // Scala version compiled the plugin
)
// bintray resolver
resolvers += Resolver.url(
"bintray-strobe-sbt-plugins",
@strobe
strobe / jargon.md
Created November 19, 2015 05:37 — forked from cb372/jargon.md
Category theory jargon cheat sheet

Category theory jargon cheat sheet

A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)

I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.

Functor

A functor is something that supports map.

@strobe
strobe / lenses.scala
Last active October 29, 2015 07:39
monocle automatically generated lenses example
package monocle
import monocle.macros.{GenLens, Lenses}
import shapeless.test.illTyped
class LensMonoExample extends MonocleSuite {
// @Lenses generate Lens automatically in the companion object
@Lenses case class Address(streetNumber: Int, streetName: String)
@Lenses case class Person(name: String, age: Int, address: Address)
@strobe
strobe / .emacs
Last active August 6, 2016 17:00
osx emacs config for scala
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; !! General Settings !!
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@strobe
strobe / BackendApp.scala
Last active August 29, 2015 14:09
Akka Clustering issue with per node communication
object BackendApp {
def main(args: Array[String]): Unit = {
// Override the configuration of the port when specified as program argument
val port = if (args.isEmpty) "0" else args(0)
val config = ConfigFactory.parseString(s"akka.remote.netty.tcp.port=$port").
withFallback(ConfigFactory.parseString("akka.cluster.roles = [backend]")).
withFallback(ConfigFactory.load())
val system = ActorSystem("ClusterSystem", config)
system.actorOf(Props[BackendWorkerActor], name = "backend")