View ScalazScalaCheckSpecs2Spec.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
import org.scalacheck.Properties | |
import org.specs2.ScalaCheck | |
import org.specs2.scalacheck.Parameters | |
import org.specs2.specification.core.Fragments | |
import scalaz.Scalaz._ | |
import scalaz.scalacheck.ScalazProperties._ | |
class ResourceSpec extends org.specs2.mutable.Specification with ScalaCheck { |
View JDBI2.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 com.neco_labo.db | |
import java.sql.ResultSet | |
import com.zaxxer.hikari.{HikariDataSource, HikariConfig} | |
import org.skife.jdbi.v2.sqlobject.customizers.RegisterMapper | |
import org.skife.jdbi.v2.sqlobject.{BindBean, Bind, SqlQuery} | |
import org.skife.jdbi.v2.tweak.ResultSetMapper | |
import org.skife.jdbi.v2.{StatementContext, DefaultMapper, DBI} |
View JDBI.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 com.neco_labo.db | |
import com.zaxxer.hikari.{HikariDataSource, HikariConfig} | |
import org.skife.jdbi.v2.{DefaultMapper, DBI} | |
import scala.collection.JavaConverters._ | |
object JDBI extends App { | |
val config = new HikariConfig() |
View react.html
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
<!doctype html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>react</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> |
View ShowTest.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 com.neco_labo.processiong | |
import javax.swing.JFrame | |
import com.neco_labo.processing.Test | |
/** | |
* Created by maji-KY on 2015/02/14. | |
*/ | |
object ShowTest extends App { |
View processing.sbt
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
organization := "com.neco-labo" | |
name := "processing with sbt" | |
version := "0.1" | |
scalaVersion := "2.11.5" | |
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked") |
View JsonTest.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
import org.json4s.jackson.{JsonMethods, Serialization} | |
import org.json4s.{Extraction, Formats, NoTypeHints} | |
object JsonTest extends App { | |
// Extraction.decomposeでJSON ASTを組み立てている | |
// んで、それにはsnakizeKeysってメソッドがあるのでそれを使えばスネークケースになる | |
def myWrite[A <: AnyRef](a: A)(implicit formats: Formats): String = JsonMethods.mapper.writeValueAsString(Extraction.decompose(a)(formats).snakizeKeys) | |
// プリティ☆バージョン |
View myapp.conf
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
########################################################################## | |
# $Id: myApp,v 1.0 2012/12/23 20:35:04 maji-KY $ | |
########################################################################## | |
# | |
# | |
######################################################## | |
#use diagnostics; | |
#use strict; | |
#use warnings; |
View glassfish
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
#!/bin/sh | |
# | |
# glassfish Startup script for glassfish | |
# | |
# chkconfig: - 99 01 | |
# processname: glassfish | |
# config: /etc/glassfish/glassfish.conf | |
# config: /etc/sysconfig/glassfish | |
# pidfile: /var/run/glassfish.pid | |
# description: glassfish is a JavaEE Application Server |
View SendJavaMail.java
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
//staticインポート... | |
import static javax.mail.Message.RecipientType.TO; | |
import java.io.IOException; | |
import java.util.Properties; | |
import javax.mail.Authenticator; | |
import javax.mail.MessagingException; | |
import javax.mail.PasswordAuthentication; | |
import javax.mail.Session; |
NewerOlder