Skip to content

Instantly share code, notes, and snippets.

@smparkes
smparkes / Dockerfile
Created March 21, 2016 00:09
docker build of protobuf with bazel
FROM ubuntu:15.10
RUN \
apt-get update && \
apt-get install --no-install-recommends -y openjdk-8-jre-headless && \
apt-get install --no-install-recommends -y gcc-4.9 && \
apt-get install --no-install-recommends -y g++-4.9 && \
apt-get install --no-install-recommends -y wget && \
apt-get install --no-install-recommends -y unzip && \
apt-get install --no-install-recommends -y openjdk-8-jdk && \
apt-get install --no-install-recommends -y git && \
@smparkes
smparkes / gist:1126214
Created August 4, 2011 20:44
build.scala
import sbt._
import Keys._
import com.github.siasia.WebPlugin.webSettings
object Me extends Build {
lazy val me = Project("me", file("."), settings =
Seq(name := "web",
version := "1.0",
scalaVersion := "2.9.0") ++
webSettings ++
@smparkes
smparkes / gist:1126209
Created August 4, 2011 20:43
build.sbt
name := "web"
version := "1.0"
scalaVersion := "2.9.0"
seq(webSettings :_*)
libraryDependencies ++= Seq(
"org.scalatra" %% "scalatra" % "2.0.0-SNAPSHOT",
@smparkes
smparkes / gist:1005365
Created June 2, 2011 21:21
psytec example
// code.h
// -*- Mode: ObjC; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
#include <string>
class CQR_Encode;
@interface Code : UIView {
std::string _uri;
import xsbt.ScalaInstance
import java.net.{URL, URLClassLoader}
var jniLoader: ClassLoader = null
override def getScalaInstance(version: String): ScalaInstance = {
localScalaInstances.find(_.version == version) getOrElse {
val si = ScalaInstance(version, info.launcher)
if (jniLoader == null) {
val list = List(
import xsbt.ScalaInstance
import java.net.{URL, URLClassLoader}
var jniLoader: ClassLoader = null
override def getScalaInstance(version: String): ScalaInstance = {
localScalaInstances.find(_.version == version) getOrElse {
val si = ScalaInstance(version, info.launcher)
if (jniLoader == null) {
val list = List(
diff --git a/compile/ScalaInstance.scala b/compile/ScalaInstance.scala
index 9f13b1b..4c7da29 100644
--- a/compile/ScalaInstance.scala
+++ b/compile/ScalaInstance.scala
@@ -7,8 +7,12 @@ package xsbt
* for the compiler itself.
* The 'version' field is the version used to obtain the Scala classes. This is typically the version for the maven repository.
* The 'actualVersion' field should be used to uniquely identify the compiler. It is obtained from the compiler.properties file.*/
-final class ScalaInstance(val version: String, val loader: ClassLoader, val libraryJar: File, val compilerJar: File, val extraJars: Seq[File]) extends NotNull
+final class ScalaInstance(val version: String, val parentLoader: ClassLoader, val libraryJar: File, val compilerJar: File, val extraJars: Seq[File]) extends NotNull
#!/usr/bin/env macruby
framework 'AppKit'
framework 'QTKit'
framework 'QuartzCore'
framework 'CoreVideo'
class AppDelegate
def applicationDidFinishLaunching(notification)
@window = NSWindow.alloc.initWithContentRect([200, 300, 640, 480],
XXXXXXXXXXXXXXXX XXXXXXXXX XX XX XXXXX XXXX XX XXXXXXXXX XX XX
XXXXXXXXXXXXXXXX XXXXXXXXX XXX XX XXXXX XXXXX XX XXXXXXXXX XX XXX
XXXXXXXXXXXXXXXX XXXXXXXX XXX XX XXXX XXXXXXXXXXXXXXXXXX XXX XXX XX XXXX
XXX XXX XXX XX XXX XXX XXXXXXXXX XX XX XX XX
XXX XXX XX XX XXX XX XXXXXXXXX XXX XX XX XX
XXX XXXXXXX XXX XX XXXXXXX XXXXXXXXX XXXXX XX XXX XXX XX XX XXXX
XXX XXXXXXX XXX XX XXXXXXX XXXXXXXXX XXXXX XX XXX XXX XX XX XXXX
XXX XXXXXXX XXX XXXXXXX XXXX XXX XXX XXXXXXX XXX XXXXXX XXXX XXX
XXX XXXXXXX XXX XXXXXXX XXXX XXX XXX XXXXXXX XX XXXXXX XXXX XXX
XXX XXXXXXX XXX XXXXXXXXX XXX XX XXXXXXXXX XXXXXXX XX XXXXXXXXXXX
Using the default profile...
-----F
(::) failed steps (::)
scope '//*[@id = 'messages']//*[contains(concat(' ', @class, ' '), ' message ') and position() = 2]' not found on page (Capybara::ElementNotFound)
./features/step_definitions/posts_steps.rb:20
./features/step_definitions/posts_steps.rb:18:in `each'
./features/step_definitions/posts_steps.rb:18:in `/^I fill in messages with "([^\"]*)"$/'
features/manage_posts.feature:15:in `And I fill in messages with "<messages>"'