Skip to content

Instantly share code, notes, and snippets.

View seratch's full-sized avatar

Kazuhiro Sera seratch

View GitHub Profile
@seratch
seratch / README.md
Last active November 16, 2019 03:53
Build a Slack app using Quarkus!

How to run on your laptop

export SLACK_BOT_TOKEN=xoxb-xxx-yyy
export SLACK_SIGNING_SECRET=zzz
mvn compile quarkus:dev
ngrok http 8080

How to build the app

@seratch
seratch / build.gradle.kts
Last active October 7, 2019 12:04
Lightning ⚡app in Kotlin
plugins {
id("org.jetbrains.kotlin.jvm") version "1.3.50"
}
repositories {
mavenCentral()
}
dependencies {
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
@seratch
seratch / App.java
Last active May 20, 2019 04:55
Call Slack APIs with no deps in Java 11+
package com.github.seratch;
import java.net.URI;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.util.Map;
@seratch
seratch / H2SampleSpec.scala
Last active December 25, 2018 12:01
r2dbc sample in Scala
import org.scalatest._
class H2Spec extends FlatSpec with Matchers {
case class Sample(id: Long, name: Option[String])
"H2 connections" should "work" in {
import io.r2dbc.h2.{ H2ConnectionConfiguration, H2ConnectionFactory }
import io.r2dbc.client.R2dbc
@seratch
seratch / scalamatsuri-2018-oss-hack-a-thon.md
Last active March 28, 2018 10:11
ScalaMatsuri 2018 OSS Hack-a-thon w/z @seratch
@seratch
seratch / abstract_in_japanese.md
Last active August 9, 2017 01:36
RubyKaigi 2017 CFP (not accepted)

私は Scala のフルスタック Web フレームワークの作者です。 そのフレームワーク、Skinny Framework のコンセプトは Scala on Rails で、このフレームワークは Ruby on Rails に強く影響を受けています。 このフレームワークはリリースされてしばらく経っており、国内外の企業で利用されています。

http://skinny-framework.org/

私は数年間 Scala を好んで使っていますが、同時にその間仕事では Rails エンジニアとして Web アプリケーション開発に従事してきました。 Rails コミュニティはとても大きく、Rails フォロワーのフレームワークメンテナとして、進化を続ける Rails コミュニティを追いかけていくことは簡単ではありませんでした。

それだけでなく、近年、Scala コミュニティは非同期な API を使った non blocking なアーキテクチャがトレンドになってきています。

@seratch
seratch / Bootstrap.scala
Last active October 8, 2017 09:45
Skinny Micro on GAE
import javax.servlet._
import skinny.micro._
class Bootstrap extends LifeCycle {
override def init(ctx: ServletContext) {
example.App.mount(ctx)
}
}
@seratch
seratch / doc.md
Last active February 26, 2017 14:18
Scala Introduction for Java developers

Scala Introduction for Java developers

  • ScalaMatsuri 2017

prerequisites

  • JDK 8+ (if you'd like to use the latest Scala)
  • brew install sbt to install the global sbt launcher script

scala lang version

@seratch
seratch / app.scala
Last active January 3, 2017 16:18
scalikejdbc-streams alpha
package example
// How to run: `sbt run`
object ReactiveStreamsExample extends App {
import scalikejdbc._
import org.slf4j._
private val logger = LoggerFactory.getLogger("app")
@seratch
seratch / console.log
Created November 4, 2016 13:13
broken .sbt/0.13/plugins/*
[info] Loading global plugins from /Users/kazuhirosera/.sbt/0.13/plugins
Error wrapping InputStream in GZIPInputStream: java.io.EOFException
at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
at sbt.WrapUsing.open(Using.scala:34)
at sbt.Using.apply(Using.scala:23)
at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:863)
at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:862)
at sbt.Using.apply(Using.scala:24)
at sbt.IO$.gzipFileIn(IO.scala:862)
at sbt.Sync$.readUncaught(Sync.scala:88)