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> trait YouCantMatchMe | |
defined trait YouCantMatchMe | |
scala> object YesICan extends Traitor[YouCantMatchMe] | |
defined module YesICan | |
scala> def uncatchable_?(any: Any) = any match { | |
| case YesICan(uncatchable) => Some(uncatchable) | |
| case _ => None | |
| } |
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
module TicTacToe | |
( Player | |
, Position | |
, Board | |
, InProgress | |
, Finished | |
, GameBoard | |
, Playable | |
, Completed | |
, move |
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
require 'formula' | |
class Giter8 <Formula | |
JAR = 'sbt-launch-0.7.4.jar' | |
url "http://simple-build-tool.googlecode.com/files/#{JAR}" | |
homepage 'http://github.com/n8han/giter8' | |
md5 '8903fb141037056a497925f3efdb9edf' | |
version '0.1.1' | |
def install |
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 bestappever && cd bestappever | |
g8 gseitz/android-sbt-project | |
sbt update | |
sbt compile |
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
// dependency: org.apache.httpcomponents %% httpclient % 4.0.1 | |
class SSLTest { | |
import javax.net.ssl.SSLContext | |
import org.apache.http.conn.ssl.SSLSocketFactory | |
val ctx = SSLContext.getInstance("TLS") | |
ctx.init(null, null, null) | |
val sf = new SSLSocketFactory(ctx) |
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
// A simple trait: | |
trait CascadingActions { | |
implicit def tToActioneerT[T](t: T) = Actioneer(t) | |
case class Actioneer[T](tee: T) { | |
def withAction(action: (T => Unit)): T = | |
withActions(action) | |
def withActions(actions: (T => Unit)*): T = { |
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
#!/bin/sh -e | |
if [ ! $SBT_VERSION ]; then SBT_VERSION=0.7.4; fi | |
if [ ! $SBT_DIR ]; then SBT_DIR=$HOME/.sbt; fi | |
if [ ! $SBT_FILENAME ]; then SBT_FILENAME=sbt-launch-$SBT_VERSION.jar; fi | |
if [ ! $SBT_LOCATION ]; then SBT_LOCATION=$SBT_DIR/$SBT_FILENAME; fi | |
SBT_URL="http://simple-build-tool.googlecode.com/files/$SBT_FILENAME" | |
if [ ! -f $SBT_LOCATION ]; |
NewerOlder