- Install IntelliJ + Scala Plugin
- Don’t do the Coursera courses yet.
- Don’t do the “red book” Functional Programming in Scala yet.
- Do: http://underscore.io/books/
- Essential Scala
- Essential Play
- Essential Slick
- Do Scala for the Impatient: https://www.amazon.com/Scala-Impatient-Cay-S-Horstmann/dp/0321774094
- The Neophyte’s Guide to Scala http://danielwestheide.com/scala/neophytes.html
| README.txt - DIY Scala Enumeration | |
| Copyright (C) 2014-2016 Jim O'Flaherty | |
| Overview: | |
| Provide in Scala the closest equivalent to Java Enum | |
| - includes decorating each declared Enum member with extended information | |
| - guarantees pattern matching exhaustiveness checking | |
| - this is not available with scala.Enumeration | |
| ScalaOlio library (GPLv3) which contains more up-to-date versions of both `org.scalaolio.util.Enumeration` and `org.scalaolio.util.EnumerationDecorated`: |
| /* | |
| Overview | |
| -------- | |
| To run a query using anorm you need to do three things: | |
| 1. Connect to the database (with or without a transaction) | |
| 2. Create an instance of `anorm.SqlQuery` using the `SQL` string interpolator | |
| 3. Call one of the methods on `SqlQuery` to actually run the query |
| #include <netdb.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <errno.h> | |
| #define CANARY "in_the_coal_mine" | |
| struct { | |
| char buffer[1024]; |
| import sbt._ | |
| import Keys._ | |
| import java.net._ | |
| import java.io.File | |
| import play.PlayRunHook | |
| /* | |
| Grunt runner should be in project directory to be picked up by sbt | |
| */ | |
| object Grunt { |
| /** | |
| * This was something I explored today. | |
| * The approach is fundamentally flawed for a couple of reasons. | |
| * | |
| * 1. play JSON serializes dates to strings, | |
| * but they are better represented as timestamps or ISODates in mongo. | |
| * | |
| * 2. ObjectId's cannot be round-tripped, since they turn into JSON | |
| * strings on the way out. | |
| * |
| // Inspired by a tweet from @trautonen 1/13/2016 | |
| // Use Source.unfoldAsync to turn paginated database results into an akka-streams Source | |
| // unfold is the inverse of fold | |
| case class Page[T](pageNumber:Long, totalPages:Long, contents:List[T]) | |
| case class Thing(id: Long, name: String = "foo") | |
| val totalPages = 5 // | |
| val pageSize = 3 |
| node { | |
| echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1' | |
| echo 'No quotes, pipeline command in single quotes' | |
| sh 'echo $BUILD_NUMBER' // 1 | |
| echo 'Double quotes are silently dropped' | |
| sh 'echo "$BUILD_NUMBER"' // 1 | |
| echo 'Even escaped with a single backslash they are dropped' | |
| sh 'echo \"$BUILD_NUMBER\"' // 1 | |
| echo 'Using two backslashes, the quotes are preserved' | |
| sh 'echo \\"$BUILD_NUMBER\\"' // "1" |
| # https://ubuntuforums.org/archive/index.php/t-751169.html | |
| sudo apt-get install -y festival festlex-cmu festlex-poslex festlex-oald libestools1.2 unzip | |
| sudo apt-get install -y festvox-don festvox-rablpc16k festvox-kallpc16k festvox-kdlpc16k | |
| mkdir cmu_tmp | |
| pushd . | |
| cd cmu_tmp/ | |
| wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_awb_arctic-0.90-release.tar.bz2 | |
| wget -c http://www.speech.cs.cmu.edu/cmu_arctic/packed/cmu_us_bdl_arctic-0.95-release.tar.bz2 |
Note
My approach contains some guesswork and might lack depth in a few areas. If you notice any mistakes or opportunities for improvement, the easiest way to reach out to me is either commenting under this Gist, or writing directly on Discord where I have the same nickname as here.
After profiling ESLint rules' performance in the Svelte repository, Ben McCann noticed that the n/prefer-node-protocol rule takes almost 50% of the total linting time: eslint-community/eslint-plugin-n#404. As with most issues I tackle, I wanted to start by reproducing the result, so I cloned the Svelte repository, installed the dependencies, and ran pnpm build.
Initially, I tried to check the performance in a more granular way with the --stats option (available in ESLint 9+, which is used in this particular project). This has proven unfeasible though as even when outputting JSON and redirecting stdo