I hereby claim:
- I am michaelahlers on github.
- I am michaelahlers (https://keybase.io/michaelahlers) on keybase.
- I have a public key ASDxnGn9BcucjilpJv6GW8GVTmYa1Tb7dPtHwA6fsGymMwo
trait JavaApi { | |
def isAuthenticated: Boolean | |
} | |
sealed trait IsAuthenticated | |
object IsAuthenticated { | |
def unapply(x: JavaApi): Option[IsAuthenticated] = | |
if (x.isAuthenticated) Some(Yes) | |
else Some(No) | |
} |
version: '{build}' | |
skip_branch_with_pr: true | |
platform: | |
- x64 | |
image: | |
- macOS | |
- Ubuntu |
#!/bin/bash | |
IN_FILE="*.mp4" | |
OUT_FILE="output.mp4" | |
ffmpeg \ | |
-safe 0 \ | |
-f concat \ | |
-i <(for file in $IN_FILE; do echo "file '$(pwd)/$file'"; done) \ | |
-c copy \ |
#!/bin/bash | |
BUCKET_NAME="my-bucket" | |
KEY_PREFIX="my-key-prefix" | |
DAYS = "10" | |
aws s3 ls --recursive "s3://$BUCKET_NAME/$KEY_PREFIX" |\ | |
awk '{$1=$2=$3=""; print $0}' |\ | |
sed 's/^[[:space:]]*//g' |\ | |
tr '\n' '\0' |\ |
import org.scalamock.scalatest._ | |
import org.scalatest._ | |
import scala.language.implicitConversions | |
class EntityReferenceSpec extends WordSpec with MockFactory { | |
"An entity" that { | |
"is also a reference" when { |
import org.neo4j.driver.v1._ | |
import org.neo4j.graphdb.factory.GraphDatabaseSettings | |
import org.neo4j.helpers.ListenSocketAddress._ | |
import org.neo4j.kernel.configuration.BoltConnector.EncryptionLevel._ | |
import org.neo4j.kernel.configuration.Connector.ConnectorType._ | |
import org.neo4j.kernel.configuration.Settings.{ FALSE, TRUE } | |
import org.neo4j.kernel.configuration._ | |
import org.neo4j.test._ | |
import org.scalatest._ |
# See https://intellij-support.jetbrains.com/hc/en-us/articles/206544859-Mac-OS-specific-configuration-of-the-JVM-options for detials. | |
-server | |
-Xms2g | |
-Xmx2g | |
-XX:NewRatio=3 | |
-Xss16m | |
-XX:+UseConcMarkSweepGC | |
-XX:+CMSParallelRemarkEnabled | |
-XX:ConcGCThreads=4 |
I hereby claim:
Scala should have a shot at this classic nerd fight.
Concise version:
(1 to 5).map("*"*).foreach(println)
import scalaz.PLens._ | |
import scalaz.Lens._ | |
import scalaz._ | |
case class Name(given: Option[String] = None, family: Option[String] = None) | |
val givenL: Name @> Option[String] = lensg(a => v => a.copy(given = v), _.given) | |
val familyL: Name @> Option[String] = lensg(a => v => a.copy(family = v), _.family) | |
case class Contact(name: Option[Name] = None) |