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 models | |
import utils.StringUtils | |
case class Document(id: Option[Long], content: String) { | |
lazy val abbreviatedContent: String = StringUtils.ellipses(content, 100) | |
} |
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
# --- !Ups | |
CREATE SCHEMA app; | |
CREATE TABLE app.document ( | |
id BIGSERIAL NOT NULL PRIMARY KEY, | |
content TEXT, | |
search_field tsvector | |
); |
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 com.megafarad.omoiomoi.binders | |
import play.api.mvc.QueryStringBindable | |
import java.time.format.DateTimeParseException | |
import java.time.zone.ZoneRulesException | |
import java.time.{LocalDate, ZoneId} | |
object CustomBinders { | |
implicit def localDateBinder(implicit stringBinder: QueryStringBindable[String]): QueryStringBindable[LocalDate] = new QueryStringBindable[LocalDate] { |
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 com.megafarad.omoiomoi.controllers | |
import com.megafarad.omoiomoi.auth.AuthAction | |
import com.megafarad.omoiomoi.dao.MeetingDAO | |
import com.megafarad.omoiomoi.model.Meeting._ | |
import com.megafarad.omoiomoi.model.MeetingEvent._ | |
import com.megafarad.omoiomoi.model.{Meeting, MeetingEvent, Page, SearchResult} | |
import play.api._ | |
import play.api.cache.AsyncCacheApi |
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 com.megafarad.omoiomoi.dao | |
import com.megafarad.omoiomoi.model._ | |
import com.megafarad.omoiomoi.model.MeetingEvent._ | |
import play.api.db.slick._ | |
import play.api.libs.json.Json | |
import slick.jdbc.JdbcProfile | |
import java.time.{Instant, LocalDate, LocalTime, ZoneId, ZonedDateTime} | |
import java.util.UUID |
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 com.megafarad.omoiomoi.model | |
import play.api.libs.json._ | |
import play.api.libs.functional.syntax._ | |
import java.time.Instant | |
sealed trait MeetingEvent | |
case class BlankEvent(roomName: String) extends MeetingEvent | |
case class StartEvent(roomName: String, timestamp: Instant) extends MeetingEvent |
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 org.jitsi.jigasi.transcription; | |
import org.eclipse.jetty.websocket.api.*; | |
import org.eclipse.jetty.websocket.api.annotations.*; | |
import org.eclipse.jetty.websocket.client.*; | |
import org.json.*; | |
import org.jitsi.jigasi.*; | |
import org.jitsi.utils.logging.*; | |
import java.io.*; |
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 com.megafarad.jmdictapi | |
import akka.actor._ | |
import akka.actor.typed.scaladsl.adapter._ | |
import akka.http.scaladsl.Http | |
import com.megafarad.jmdictapi.api.SearchRoutes | |
import com.megafarad.jmdictapi.importer.Importer | |
import com.typesafe.akka.extension.quartz.QuartzSchedulerTypedExtension | |
import com.typesafe.scalalogging.StrictLogging |
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 com.megafarad.jmdictapi.importer | |
import akka.Done | |
import akka.actor.typed._ | |
import akka.actor.typed.scaladsl._ | |
import akka.http.scaladsl.Http | |
import akka.http.scaladsl.model.{HttpRequest, HttpResponse, Uri} | |
import akka.stream.{IOResult, Materializer} | |
import akka.stream.scaladsl.{FileIO, Sink, Source} | |
import com.megafarad.jmdictapi.model.Entry |
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
[ | |
{ | |
"ent_seq": 1467640, | |
"k_ele": [ | |
{ | |
"keb": "猫", | |
"ke_inf": null, | |
"ke_pri": [ | |
"ichi1", | |
"news1", |