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 System.IO | |
| import System.Exit | |
| import XMonad | |
| import XMonad.Actions.CopyWindow | |
| import XMonad.Actions.CycleWindows | |
| import XMonad.Actions.FocusNth | |
| import XMonad.Config.Xfce | |
| import XMonad.Hooks.ManageDocks | |
| import XMonad.Hooks.ManageHelpers | |
| import XMonad.Hooks.RestoreMinimized |
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
| alias zs='column -s $'\'' '\'' -t | zebra | less -S' |
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
| val prefix = Root / "foo" / "bar" | |
| Path(req.path) match { | |
| case `prefix` / "baz" / quux => ... | |
| case `prefix` / "aaaaa" => ... | |
| } |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <scheme name="dln github" version="124" parent_scheme="Default"> | |
| <option name="LINE_SPACING" value="1.29" /> | |
| <font> | |
| <option name="EDITOR_FONT_NAME" value="Ubuntu Mono Unhinted" /> | |
| <option name="EDITOR_FONT_SIZE" value="16" /> | |
| </font> | |
| <font> | |
| <option name="EDITOR_FONT_NAME" value="Ubuntu Mono" /> | |
| <option name="EDITOR_FONT_SIZE" value="16" /> |
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
| package com.magine.example | |
| import com.twitter.finagle.http.{HttpMuxer, Request, Response} | |
| import com.twitter.finagle.Service | |
| import com.twitter.util.{Await, Future} | |
| object HelloFinagle extends App { | |
| val hello = { | |
| new Service[Request, Response] { |
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
| # -*- mode: ruby -*- | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "precise64" | |
| config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
| config.vm.network :public_network, :bridge => "eth0" | |
| config.vm.synced_folder "data", "/data" | |
| config.vm.synced_folder "mesos", "/mesos" | |
| config.vm.synced_folder "/home/dln/src/mesos-docker/target/scala-2.10", "/mesos/mesos-docker" | |
| config.vm.synced_folder "salt", "/srv/salt" |
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
| package fintest | |
| import java.net.InetSocketAddress | |
| import com.twitter.finagle.{http, SimpleFilter, Service} | |
| import com.twitter.finagle.builder.ServerBuilder | |
| import com.twitter.finagle.http.{RichHttp, Status, Response, Request} | |
| import com.twitter.finagle.http.path._ | |
| import com.twitter.util.Future | |
| import com.twitter.finagle.http.Version.Http11 | |
| import org.jboss.netty.buffer.ChannelBuffers.copiedBuffer |
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
| # -*- mode: ruby -*- | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "precise64" | |
| config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
| config.vm.network :public_network, :bridge => "eth1" | |
| config.vm.synced_folder "data", "/data" | |
| config.vm.synced_folder "mesos", "/mesos" | |
| config.vm.synced_folder "/home/dln/src/mesos-docker/target/scala-2.10", "/mesos/mesos-docker" | |
| config.vm.synced_folder "salt", "/srv/salt" |
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
| scala> val b1 = new java.lang.Boolean(true) | |
| b1: Boolean = true | |
| scala> val b2 = new java.lang.Boolean(true) | |
| b2: Boolean = true | |
| scala> java.lang.System.identityHashCode(b1) | |
| res9: Int = 358029940 | |
| scala> java.lang.System.identityHashCode(b2) |
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
| // http://www.scala-lang.org/api/current/#scala.util.Try | |
| def divide(i: Int, j: Int) = { | |
| i / j | |
| } | |
| def tryDivide(i: Int, j: Int) = { | |
| Try { | |
| i / j |