Skip to content

Instantly share code, notes, and snippets.

View longshorej's full-sized avatar
🏠
Working from home

Jason Longshore longshorej

🏠
Working from home
View GitHub Profile
@pchiusano
pchiusano / microbenchmark.markdown
Created December 2, 2011 13:49
Simple microbenchmarks comparing Scala vs Java mutable map performance

I was curious about the results reported here, which reports that Scala's mutable maps are slower than Java's: http://www.infoq.com/news/2011/11/yammer-scala

In my tests, Scala's OpenHashMap equals or beats java's HashMap:

Insertion 100k elements (String keys) time in ms:

  • scala HashMap: 92.75
  • scala OpenHashMap: 14.03125
  • java HashMap: 15.78125
@EECOLOR
EECOLOR / 1. spray-embedded-server
Last active January 1, 2016 09:49
A wrapper for Spray's Http server that performs graceful shutdown. The server can be shutdown from the outside by calling the `stop()` method of from the service by sending a message: `context.parent ! Server.Stop`. These conversations helped me find a solution: [How to stop SimpleRoutingApp without getting an error](https://groups.google.com/d/…
package org.qirx.browserTests
import scala.concurrent.Future
import scala.concurrent.Promise
import scala.concurrent.duration._
import scala.util.Try
import akka.actor.Actor
import akka.actor.ActorRef
import akka.actor.ActorSystem
@lexrus
lexrus / disable_all_animation.sh
Created August 1, 2014 06:05
Disable all animations of OS X.
# opening and closing windows and popovers
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# smooth scrolling
defaults write -g NSScrollAnimationEnabled -bool false
# showing and hiding sheets, resizing preference windows, zooming windows
# float 0 doesn't work
defaults write -g NSWindowResizeTime -float 0.001