Skip to content

Instantly share code, notes, and snippets.

View amdelamar's full-sized avatar

Austin Delamar amdelamar

View GitHub Profile
@julienroubieu
julienroubieu / JavaOptionals.scala
Last active November 14, 2019 20:46
Implicit conversions between Scala Option and Java 8 Optional
import java.util.Optional
/**
* Conversions between Scala Option and Java 8 Optional.
*/
object JavaOptionals {
implicit def toRichOption[T](opt: Option[T]): RichOption[T] = new RichOption[T](opt)
implicit def toRichOptional[T](optional: Optional[T]): RichOptional[T] = new RichOptional[T](optional)
}
@MihailJP
MihailJP / scala.xml
Last active April 19, 2024 01:14
Notepad++ syntax highlighting definition file for Scala
<NotepadPlus>
<UserLang name="Scala" ext="scala" udlVersion="2.0">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" forceLineCommentsAtBOL="no" foldCompact="no" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments" id="0">00// 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, additional" id="1"></Keywords>
<Keywords name="Numbers, prefixes" id="2">0x</Keywords>