- Web Server: Play (framework) or http4s (library)
- Actors: akka
- Asynchronous Programming: monix (for tasks, reactors, observables, scheduler etc)
- Authentication: Silhouette
- Authorization: Deadbolt
- Command-line option parsing: case-app
- CSV Parsing: kantan.csv
- DB: doobie (for PostgreSQL)
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 cats.syntax.all._ | |
object EmojiEncoding { | |
private val range_min = 127744 | |
private val range_max = 129782 | |
private val range_min_2 = 126980 | |
private val range_max_2 = 127569 | |
private val range_min_3 = 169 |
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 Ex { | |
import Lib._ | |
case class Person(name: String, age: Int) | |
case class PersonOpt(name: Option[String], age: Option[Int]) | |
def mergePerson(p: Person, po: PersonOpt) = | |
Person(po.name.getOrElse(p.name), po.age.getOrElse(p.age)) | |
case class Contact(person: Person, phone: String) |
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
// summary : Just ONE ammonite script file to execute a load performance test using gatling ! | |
// keywords : scala, gatling, ammonite, scala, load-test, performance | |
// publish : gist | |
// authors : David Crosson | |
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2) | |
// id : ea7a4259-9461-44a8-99fa-1ec6ec3c48ed | |
// created-on : 2018-09-22T07:41:07Z | |
// managed-by : https://github.com/dacr/code-examples-manager | |
// execution : scala ammonite script (http://ammonite.io/) - run as follow 'amm scriptname.sc' |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
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
/** | |
* Example of T-Digest plus method with Algebird Semigroup | |
*/ | |
import com.tdunning.math.stats.TDigest | |
import com.twitter.algebird.{Group, Semigroup} | |
import io.koff.t_digest._ | |
case object TDigestSemigroup extends Semigroup[TDigest] { |
- Download this gist as a zip and extract
- Open
chrome://extensions
- Enable
Developer mode
- Click
Load unpacked extension...
and select the extracted folder - 💵 Profit 💵
Created by the SMU CS Society
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
#!/usr/bin/env python3 | |
''' | |
Filter to wrap Pandoc's CodeBlocks into minted blocks when using latex. | |
Pandoc's `fence_code_attributes` can be used to provide: | |
- the language (first class) | |
- minted's argumentless options (following classes) | |
- minted's options with arguments (attributes) | |
''' |
This guide sets up a non-clustered Nutch crawler, which stores its data via HBase. We will not learn how to setup Hadoop et al., but just the bare minimum to crawl and index websites on a single machine.
- Nutch - the crawler (fetches and parses websites)
- HBase - filesystem storage for Nutch (Hadoop component, basically)
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
#!/usr/bin/env sh | |
open "tel://$*" |
NewerOlder