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
/* A better way to tag types? | |
* | |
* 1) object Time: here we are distinguishing between different uses of a Long, | |
* yet there is no boxing whatsoever. | |
* | |
* main calls start: ()J | |
* main calls timed: (Function0, J) | |
* Function0 gives up the result: ()J | |
* timed calls now: ()J | |
* timed calls elapsed$extension: (JJ)J |
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
Please help compile a list of all Scala-related IRC rooms. | |
All of these channels are on Freenode. | |
#akka | concurrency & distribution framework | |
#argonaut | json library | |
#fp-in-scala | the book Functional Programming in Scala | |
#geotrellis | geoprocessing library | |
#indyscala | regional scala group | |
#json4s | json library |
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
0. SSH to server | |
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml | |
2. set userSecurity to false: <userSecurity>false</userSecurity> | |
3. delete | |
<authorizationStrategy> and <securityRealm> | |
4. /etc/init.d/bitnami restart |
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
// | |
// RetroLogger | |
// A handy sbt-0.10.x plugin that allows you to set the log level like in the old days (aka sbt-0.7.x) | |
// "set logLevel := Level.Debug" ====> "debug" | |
// | |
// + put this file in ~/.sbt/plugins/ | |
// + add "sbtPlugin := true" to ~/.sbt/plugins/build.sbt | |
import sbt._ | |
import Keys._ |
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
trait Enum { //DIY enum type | |
import java.util.concurrent.atomic.AtomicReference //Concurrency paranoia | |
type EnumVal <: Value //This is a type that needs to be found in the implementing class | |
private val _values = new AtomicReference(Vector[EnumVal]()) //Stores our enum values | |
//Adds an EnumVal to our storage, uses CCAS to make sure it's thread safe, returns the ordinal | |
private final def addEnumVal(newVal: EnumVal): Int = { import _values.{get, compareAndSet => CAS} | |
val oldVec = get |