create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| import scala.slick.lifted.CanBeQueryCondition | |
| // optionally filter on a column with a supplied predicate | |
| case class MaybeFilter[X, Y](val query: scala.slick.lifted.Query[X, Y]) { | |
| def filter[T,R:CanBeQueryCondition](data: Option[T])(f: T => X => R) = { | |
| data.map(v => MaybeFilter(query.filter(f(v)))).getOrElse(this) | |
| } | |
| } | |
| // example use case | |
| import java.sql.Date |
| # Basic Strongswan ikev2 server setup | |
| * paltform: atlantic.net ubuntu 14.04 x64 | |
| * the commands below are run with root account | |
| ## Strongswan | |
| ``` | |
| apt-get install strongswan | |
| apt-get install iptables iptables-persistent | |
| ``` |
Recursion is beautiful. As an example, let's consider this perfectly acceptable example of defining the functions even and odd in Scala, whose semantics you can guess:
def even(i: Int): Boolean = i match {
case 0 => true
case _ => odd(i - 1)
}
def odd(i: Int): Boolean = i match {
| import scala.language.higherKinds | |
| object Test extends App { | |
| // PKList or the Any-Order heterogenous list | |
| sealed trait PKList[Args <: AnyKind] | |
| trait PKNil[Args <: AnyKind] extends PKList[Args] | |
| sealed trait PKCons[Args <: AnyKind, HA, TA <: PKList[Args]] extends PKList[Args] { |
There exist several DI frameworks / libraries in the Scala ecosystem. But the more functional code you write the more you'll realize there's no need to use any of them.
A few of the most claimed benefits are the following: