This file contains 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
Show hidden characters
{ | |
"shell_cmd": "highlight -O rtf -t 2 -K 32 -k 'PragmataPro' --syntax scala --style slides $file_path/$file_name | pbcopy" | |
} |
This file contains 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
# Switch to the "user package" directory on your hard drive: | |
cd 'Library/Application Support/Sublime Text 3/Packages/User/' | |
# Create a .sublime-keymap file containing the desired keyboard shortcut: | |
echo '[{ "keys": ["ctrl+super+r"], "command": "reveal_in_side_bar" }]' > 'Custom Keys.sublime-keymap' |
This file contains 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
trait FooPlugin { | |
def name: String = | |
// Get rid of synthetic '$'s in generated class names for singleton objects: | |
getClass.getSimpleName.filterNot(_ == '$') | |
// TODO: Insert Plugin Methods | |
} | |
object FooPlugin1 extends FooPlugin | |
object FooPlugin2 extends FooPlugin |
This file contains 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
/* Text field placeholders | |
* | |
* Dave Gurnell, http://www.untyped.com | |
* | |
* Example usage: $("#my-date-field").placeholder("yyyy-mm-dd"); | |
*/ | |
(function ($) { | |
// -> Boolean | |
$.fn.hasPlaceholder = function () { |
This file contains 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 sbt._ | |
import Keys._ | |
import PlayProject._ | |
import com.untyped.sbtjs.Plugin._ | |
import com.untyped.sbtless.Plugin._ | |
/* Example build config to use the Untyped JS/Less/Coffeescript plugins: | |
* | |
* http://github.com/untyped/sbt-plugins |
This file contains 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
case class Director(firstName: String, lastName: String, yearOfBirth: Int) | |
case class Film(title: String, yearOfRelease: Int, imdbRating: Double, director: Director) | |
val eastwood = new Director("Clint", "Eastwood", 1930) | |
val mcTiernan = new Director("John", "McTiernan", 1951) | |
val nolan = new Director("Christopher", "Nolan", 1970) | |
val someBody = new Director("Just", "Some Body", 1990) | |
val memento = new Film("Memento", 2000, 8.5, nolan) |
This file contains 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
[ | |
{ "keys": ["super+shift+r"], "command": "reveal_in_side_bar"} | |
] |
This file contains 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
// TODO: This code doesn't distinguish between "main" files for which we want to generate outputs, | |
// and "library" files that are used in compilation but don't generate outputs. | |
case class SourceLocation(val rel: File, val relTo: File, val abs: File) | |
// Compilation may take several steps (Coffeescript => CommonJS => Concat => Uglifyjs etc). | |
// Sources are cached on disk after each step, allowing us to check timestamps to avoid | |
// unnecessary recompilation. Compiler steps accept one or more Sources as an argument and | |
// emit one or more Sources as outputs. Each Source knows where the original source file is | |
// located, where the target file is going to end up, and where the content is cached at the |
This file contains 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
Introduction / Motivation | |
Curriculum---what you teach | |
- How to present Scala (OO, functional) | |
- Design patterns | |
Pedagogy---how you teach it | |
Technology to support teaching | |
Examples to motivate different students | |
Who Can Support It / Develop It | |
Why Invest in Learning Scala? |
This file contains 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 shapeless._ | |
import slick.ast.TypedType | |
import scala.reflect.ClassTag | |
trait GenericColumnTypeImplicits { | |
// This definition summons a column type for a type Pk provided: | |
// - Pk is a case class with a single field of type Underlying; | |
// - Slick can summon a column type for Underlying. | |
// | |
// It conflicts with MappedTo, |