12/13(土) 第1回 Scala 関西勉強会.次の (1) か (2) のどちらかを予定.
前回の
lazy val jsTestServer = task { | |
val port = "4224" | |
JsTestDriverServer.main(Array("--port", port)) | |
System.out.println("*****\nNow capture your browser: http://localhost:" + port) | |
Thread.sleep(86400 * 1000) // Otherwise it exits straight away | |
None | |
} | |
lazy val jsTestClient = task { |
Dir.chdir(File.dirname(__FILE__)) | |
# load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
# Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | |
load 'config/deploy' # remove this line to skip loading any of the default tasks |
public class A { | |
public static void main(String[] args) { | |
A a = new A() {}; | |
System.out.println(a.getClass()); | |
} | |
} |
#!/usr/bin/env xsbtscript | |
!# | |
/*** | |
scalaVersion := "2.9.0-1" | |
libraryDependencies ++= Seq( | |
"com.mongodb.casbah" %% "casbah-core" % "2.1.5-1" | |
) |
import sbt._ | |
import Defaults._ | |
libraryDependencies <++= (scalaVersion, sbtVersion) { | |
case (scalaVersion, sbtVersion @ "0.11.0") => Seq( | |
sbtPluginExtra("name.heikoseeberger.groll" % "groll" % "0.4.0-SNAPSHOT", sbtVersion, scalaVersion), // corresponds to addSbtPlugin("name.heikoseeberger.groll" % "groll" % "0.4.0-SNAPSHOT") | |
sbtPluginExtra("com.typesafe.sbteclipse" % "sbteclipse" % "1.5.0-SNAPSHOT", sbtVersion, scalaVersion) | |
) | |
case (scalaVersion, sbtVersion @ "0.11.1") => Seq( |
#spec/requests/cache_book_spec.rb | |
require 'spec_helper' | |
describe "CacheBook" do | |
# Turn on caching | |
before do | |
ActionController::Base.perform_caching = true | |
ActionController::Base.cache_store = :file_store, "tmp/cache" | |
FileUtils.rm_rf(Dir['tmp/cache']) |
#!/bin/sh | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
set -e | |
NAME="brouzie-php-53" | |
RUN_AS_USER=brouzie | |
PHP_FCGI_CHILDREN=3 | |
PHP_FCGI_MAX_REQUESTS=200 |
Pushing a certain quantity/mixture of data through a VB guest's NAT interface causes all TCP/UDP connections to fail for a period of time thereafter.
The only way I've been able to reliably reproduce this is to use pip(1)
to download a large list of Python packages. After a number of packages have been downloaded (14~20) pip will exit with an HTTP or DNS timeout. Inbound port-forwarded SSH connections will drop with:
Connection to 127.0.0.1 closed by remote host.
This appears most likely to occur with the Intel PRO/1000 MT Desktop (82540EM)
NIC. It is harder to reproduce with PCnet-FAST III (Am79C973)
NICs. It is not reproducible with host-only or bridged adapters.
{ | |
val script = "hello.d" | |
seq( | |
TaskKey[Unit]("dmd") <<= (compile in Compile).map{ _ => | |
val ret = ("dmd -run " + script) !; | |
if(ret != 0)sys.error("compile fail") | |
} | |
, | |
watchSources += file(script) | |
) |