Skip to content

Instantly share code, notes, and snippets.

View seratch's full-sized avatar

Kazuhiro Sera seratch

View GitHub Profile
@seratch
seratch / PostgreSQLAnalyzer.scala
Last active August 29, 2015 14:23
PostgreSQLAnalyzer for ScalikeJDBC Users
package lib
import java.sql.Timestamp
import org.joda.time._
import scalikejdbc._
/**
* Usage:
* scalikekdbc.GlobalSettings.queryCompletionListener = PostgreSQLAnalyzer.queryCompletionListener
*/
@seratch
seratch / Gemfile
Created July 27, 2015 17:14
STOMP virtual host examples
source 'https://rubygems.org'
gem 'stomp'
@seratch
seratch / app.scala
Last active September 3, 2015 06:50
AutoRouting idea
import skinny.micro._
import skinny.micro.contrib.AutoRouting
// @path("/articles")
class Articles extend WebApp with AutoRouting {
// curl /articles/123?withComments=false
@get @path("/:id")
def show(id: Long, withComments: Option[Boolean]): ActionResult = ???
@seratch
seratch / console.log
Created November 23, 2015 11:15
Spring Boot + Spring Loaded
$ ./gradlew bootRun
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
:compileJava
:processResources UP-TO-DATE
:classes
:findMainClass
:bootRun
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
@seratch
seratch / build.gradle
Created January 11, 2016 09:03
./gradlew test for Scala projects
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.maiflai:gradle-scalatest:0.11"
}
}
@seratch
seratch / console.log
Last active January 11, 2016 13:39
sbt jar downloads
$ sbt
[info] Loading project definition from /Users/seratch/tmp/sbtsbt/project
[info] Updating {file:/Users/seratch/tmp/sbtsbt/project/}sbtsbt-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.timushev.sbt/sbt-updates/scala_2.10/sbt_0.13/0.1.7/jars/sbt-updates.jar ...
[info] [SUCCESSFUL ] com.timushev.sbt#sbt-updates;0.1.7!sbt-updates.jar (6278ms)
[info] downloading https://jcenter.bintray.com/org/scala-lang/scala-library/2.10.5/scala-library-2.10.5.jar ...
[info] [SUCCESSFUL ] org.scala-lang#scala-library;2.10.5!scala-library.jar (5492ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.9/jars/sbt.jar ...
[info] [SUCCESSFUL ] org.scala-sbt#sbt;0.13.9!sbt.jar (6681ms)
@seratch
seratch / console.log
Created January 13, 2016 03:31
sonatype publish error
Please enter PGP passphrase (or ENTER to abort): ************************
[error] Unable to find credentials for [Nexus Repository Manager @ oss.sonatype.org].
[error] Is one of these realms mispelled for host [oss.sonatype.org]:
[error] * Sonatype Nexus Repository Manager
[error] Unable to find credentials for [Nexus Repository Manager @ oss.sonatype.org].
[error] Is one of these realms mispelled for host [oss.sonatype.org]:
[error] * Sonatype Nexus Repository Manager
[error] Unable to find credentials for [Nexus Repository Manager @ oss.sonatype.org].
[error] Is one of these realms mispelled for host [oss.sonatype.org]:
[error] * Sonatype Nexus Repository Manager
@seratch
seratch / build.sbt
Last active February 22, 2016 02:45
sbt 0.13.10 still uses jcenter primarily when using older sbt-launch.jar
libraryDependencies += "org.skinny-framework" %% "skinny-micro" % "1.0.3"
scalaVersion := "2.11.7"
@seratch
seratch / tree.log
Created April 5, 2016 15:48
activator 1.3.9
This file has been truncated, but you can view the full file.
.
├── LICENSE.html
├── README.html
├── bin
│   ├── activator
│   ├── activator-dist
│   ├── activator-dist.bat
│   └── activator.bat
├── lib
│   ├── com.typesafe.activator.activator-dist-1.3.9.jar
@seratch
seratch / setup.md
Last active December 15, 2016 03:15
Atom + ENSIME setup in Japanese

sbt プロジェクトの準備

$HOME/.sbt/0.13/plugins/plugins.sbt

// just for sbt ensimeConfig
if (sys.props("java.version").startsWith("1.6")) addSbtPlugin("org.ensime" % "sbt-ensime" % "1.0.0")