- Web系
- Scalatra Sinatraのようなフレームワーク https://github.com/scalatra/scalatra
- Scalate テンプレートエンジン。言語を選べる http://scalate.fusesource.org/
- Play! framework 2.0 プロダクト自体がScalaで実装されている。 http://www.playframework.org/2.0
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
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
## Java | |
sudo apt-get update | |
sudo apt-get install default-jdk | |
## Scala | |
sudo apt-get remove scala-library scala | |
sudo wget http://scala-lang.org/files/archive/scala-2.12.1.deb | |
sudo dpkg -i scala-2.12.1.deb | |
sudo apt-get update | |
sudo apt-get install scala |
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 poc | |
import org.scalajs.dom | |
import scala.scalajs.js | |
import scala.scalajs.js.annotation.JSExport | |
@js.native | |
object WorkerGlobal extends js.GlobalScope { | |
def addEventListener(`type`: String, f: js.Function): Unit = js.native |
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
swagger: '2.0' | |
info: | |
title: ChatWork API | |
version: v1 | |
# the domain of the service | |
host: api.chatwork.com | |
# array of all schemes that your API supports | |
schemes: | |
- https | |
# will be prefixed to all paths |
AWS Lambda has nice safeguards for logging but not great handling for error reporting. I typically use Sentry but in this project, we're using Rollbar
Here's a setup to remove AWS Lambda's forceful exit on uncaught error and replace it with an error reporter to Rollbar:
// Load in our dependencies
const assert = require('assert');
const Rollbar = require('rollbar');
// Initialize our Rollbar handler
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
// ==UserScript== | |
// @name gh - show approvals | |
// @namespace https://github.com/unarist | |
// @version 0.4 | |
// @author unarist | |
// @match https://github.com/* | |
// @grant none | |
// @downloadURL https://gist.github.com/unarist/c45bd5e8102afe7ce27d757a87819ea4/raw/github-show-approvals.user.js | |
// @run-at document-idle | |
// @noframes |
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 scalafix.Diagnostic | |
import scalafix.Patch | |
import scalafix.lint.LintSeverity | |
import scalafix.v1.SyntacticDocument | |
import scalafix.v1.SyntacticRule | |
import scala.meta.Lit | |
import scala.meta.Term | |
import scala.meta.inputs.Position | |
class NoElse extends SyntacticRule("NoElse") { |
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
rules = [ | |
Disable | |
DisableSyntax | |
ExplicitResultTypes | |
LeakingImplicitClassVal | |
NoAutoTupling | |
NoValInForComprehension | |
ProcedureSyntax | |
RemoveUnused | |
MissingFinal |
OlderNewer