import scala.concurrent.Future
import java.util.concurrent.Executor
import scala.concurrent.ExecutionContext
//Please don't do this in production code! It is used to execute
//the documentation code synchronously to generate more readable output
implicit val synchronousExecutionContext = ExecutionContext.fromExecutor(new Executor {
def execute(task: Runnable) = task.run()
})
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
1 | |
Cargo.lock | |
Cargo.toml | |
src | |
target |
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
1 | |
Cargo.lock | |
Cargo.toml | |
src | |
target |
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 Longable{ def toLong(): Long } | |
implicit class IntCanLong(int: Int) extends Longable { | |
def toLong(): Long = int.toLong | |
} | |
implicit class StringCanLong(str: String) extends Longable { | |
def toLong(): Long = str.toInt.toLong | |
} |
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
/*_*/ | |
val 1 = "Hello" | |
/*_*/ |
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
object && { | |
def unapply[A](e: A) = Some(e -> e) | |
def test() { | |
val greaterThan10 = Find[Int](_ > 10) | |
List(1, 2, 11, 3) match { | |
// All must succeed | |
case greaterThan10(ten) && Last(last) && Head(head) => | |
println(ten) // 11 | |
println(last) // 3 |
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
#!/bin/bash | |
#echo "Start Export Process" | |
#echo "Log into Keybase..." | |
keybase login | |
#echo "Exporting your PGP keys..." | |
keybase pgp export -o keybase.public.key | |
keybase pgp export -s -o keybase.private.key |
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
{ | |
"version":"0.1", | |
"advices":[{ | |
"error":{ | |
"type":"notAMember", | |
"what":"value step", | |
"notAMemberOf":".*Partial.*" | |
}, | |
"text":"You may need to import matryoshka.instances._", | |
"library":{ |
I hereby claim:
- I am shanedelmore on github.
- I am shanedelmore (https://keybase.io/shanedelmore) on keybase.
- I have a public key ASCjD-4yeo9keUkltfhWRotlwERtREAP0_piYbBacvX0cAo
To claim this, I am signing this object:
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
package scalafix.util | |
import scala.collection.immutable.Seq | |
import scala.meta._ | |
import syntax._ | |
object Import { | |
def remove(prefix: String, term: String): PartialFunction[Tree, Tree] = { | |
case b @ q"{ ..$stats }" /* verify targeted term exists */ => | |
val newStats: Seq[Stat] = stats.collect { |
NewerOlder