Skip to content

Instantly share code, notes, and snippets.

trait T {
val pub = "public"
}
class extends T
------
trait T {
def pub: String = "public"
def pub_=(b: String): Unit = ???
}
class extends T
@adriaanm
adriaanm / tamper2jira.js
Last active August 29, 2015 13:56
// ==UserScript== // @name Scala Github Jira Linker // @Version 0.2 // @namespace http://retronym.gitbub.com/ // @description Add links from github to the Scala Jira instance // @match http://*.github.com/*/scala* // @match https://*.github.com/*/scala* // @include http://*github.com/*/scala* // @include https://*github.com/*/scala* // ==/UserSc…
// ==UserScript==
// @name Scala Github Jira Linker
// @version 0.2
// @namespace http://retronym.gitbub.com/
// @description Add links from github to the Scala Jira instance
// @match http://*.github.com/*/scala*
// @match https://*.github.com/*/scala*
// @include http://*github.com/*/scala*
// @include https://*github.com/*/scala*
// ==/UserScript==
@adriaanm
adriaanm / auto-publish
Last active August 29, 2015 14:10
how to set up autopublish, companion to https://github.com/scala/scala-swing/commit/a6a8e1d77e
cd ~/git/scala-<MODULE>
g co -b autopublish
g fetch https://github.com/adriaanm/scala-swing.git autopublish # can't fetch by sha by design
g cherry-pick a6a8e1d77e # generic auto-publish machinery
g gc ; g prune # remove unneeded refs from scala-swing
cat admin/gpg.sbt >> project/plugins.sbt
sbt
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM
# AND install 7-zip, curl and .NET 4 if its missing.
# Then use the EC2 tools to create a new AMI from the result, and you have a system
# that will execute user-data as a PowerShell script after the instance fires up!
# This has been tested on Windows 2008 SP2 64bits AMIs provided by Amazon
#
# Inject this as user-data of a Windows 2008 AMI, like this (edit the adminPassword to your needs):
#
# <powershell>
# Set-ExecutionPolicy Unrestricted
Start-Transcript -Path 'c:\vagrant-transcript.log' -Force
Set-StrictMode -Version Latest
Set-ExecutionPolicy Unrestricted
$id = &winrm id
if (($id -eq $null) -and (Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -name LocalAccountTokenFilterPolicy -ErrorAction SilentlyContinue) -eq $null)
{
New-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -name LocalAccountTokenFilterPolicy -value 1 -propertyType dword
}
@adriaanm
adriaanm / 2.11.4-ci
Created January 7, 2015 17:37
2.11.4 jars built with new CI
http://private-repo.typesafe.com/typesafe/scala-release-temp/org/scala-lang/modules/scala-parser-combinators_2.11.4-ff9b008-nightly/1.0.2/scala-library-all-2.11.4-ff9b008-nightly.pom
http://private-repo.typesafe.com/typesafe/scala-release-temp/org/scala-lang/modules/scala-parser-combinators_2.11.4-ff9b008-nightly/1.0.2/scala-parser-combinators_2.11.4-ff9b008-nightly-1.0.2-javadoc.jar
http://private-repo.typesafe.com/typesafe/scala-release-temp/org/scala-lang/modules/scala-parser-combinators_2.11.4-ff9b008-nightly/1.0.2/scala-parser-combinators_2.11.4-ff9b008-nightly-1.0.2-sources.jar
http://private-repo.typesafe.com/typesafe/scala-release-temp/org/scala-lang/modules/scala-parser-combinators_2.11.4-ff9b008-nightly/1.0.2/scala-parser-combinators_2.11.4-ff9b008-nightly-1.0.2.jar
http://private-repo.typesafe.com/typesafe/scala-release-temp/org/scala-lang/modules/scala-partest_2.11.4-ff9b008-nightly/1.0.1/scala-parser-combinators_2.11.4-ff9b008-nightly-1.0.2.pom
http://private-repo.typesafe.com/typesafe/scala-rele
@adriaanm
adriaanm / 2.11.4-rebuilt.patch
Last active August 29, 2015 14:13
Full diff (all benign) of official 2.11.4 jars on maven, and a rebuild using our new Jenkins infrastructure. jars in https://oss.sonatype.org/content/repositories/orgscala-lang-[1160|1159]/org/scala-lang/ built by http://scala-ci.typesafe.com/job/scala-release-2.11.x-build/8/
diff --git i/scala-actors-2.11.4-sources/META-INF/MANIFEST.MF w/scala-actors-2.11.4-sources/META-INF/MANIFEST.MF
index 1e720e11d6..255fd83039 100644
--- i/scala-actors-2.11.4-sources/META-INF/MANIFEST.MF
+++ w/scala-actors-2.11.4-sources/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
-Ant-Version: Apache Ant 1.8.4
-Created-By: 1.6.0_33-b04 (Sun Microsystems Inc.)
+Ant-Version: Apache Ant 1.9.4
+Created-By: 1.6.0_45-b06 (Sun Microsystems Inc.)
@adriaanm
adriaanm / cbfsigs.scala
Created February 18, 2015 20:29
Tabulate all uses of CanBuildFrom in the collections.
// import scala.reflect.internal.util._
// import scala.tools.nsc._
// import reporters._
// val _settings = new Settings()
// _settings.processArguments(List("-Ydebug", "-Ylog:all"), true)
// val reporter = new ConsoleReporter(_settings)
// val compiler = new Global(_settings, reporter)
//
// import compiler._
// val run = new Run
@adriaanm
adriaanm / scaladocs.md
Created May 10, 2015 16:12
importing docs for scaladoc from the scala wiki

Scaladoc 2 improves overs previous versions of Scaladoc with:

  • A sleeker, more modern interface;
  • Improved comment syntax that help writing documentation for complex libraries:
  • support for wiki-like syntax in the source comments,
  • improved comment inheritance,
  • compile-time checking of documentation errors,
  • advanced commenting constructs, such as use cases and macro definitions;
  • A new API for writing programs that explore Scala libraries or systems at the API level (this includes Scaladoc-like documentation generation, API querying, software engineering metrics, etc.).

Scaladoc 2 was originally created by Gilles Dubochet. It is based on the original Scaladoc

@adriaanm
adriaanm / scala-jenkins-infra-dotty.md
Last active August 29, 2015 14:21
scala-jenkins-infra-dotty

DarkDimius Hi Adriaan, Can we discuss jenkins for a moment?

adriaanm sorry, just saw this now

DarkDimius Hi, no prob. I’ve already asked most questions in the PR Does your setup require to define jobs using those templates? Or could it be defined statically in jenkins?