- Play の WebSocket で何か
- Akka を使った何か
- ディスク IO に関した何か
- Play scaffold sbt plugin
- DSL をつくる?
- giter8 で何か
- Play の javascriptRouter
- クローラシステム
- Node.js のサンプルを移植
- AWS と連携
This file contains hidden or 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 scala.xml._ | |
| val xml: Elem = XML.load("./input.xml") | |
| val formatted: String = new PrettyPrinter(80, 2).format(xml) | |
This file contains hidden or 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
| access_key_id: xxx | |
| secret_access_key: yyy |
This file contains hidden or 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
| # http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_sinatra.html | |
| wget https://s3.amazonaws.com/elasticbeanstalk/cli/AWS-ElasticBeanstalk-CLI-2.2.zip | |
| unzip AWS-ElasticBeanstalk-CLI-2.2.zip | |
| mkdir eb_ruby | |
| cd eb_ruby | |
| echo "require './helloworld' | |
| run Sinatra::Application" > config.ru |
This file contains hidden or 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 sbt._ | |
| import Keys._ | |
| import play.Project._ | |
| object ApplicationBuild extends Build { | |
| val appName = "sample" | |
| val appVersion = "1.0-SNAPSHOT" | |
| val appDependencies = Seq( |
This file contains hidden or 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
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath group: 'org.twitter4j', name: 'twitter4j-core', version: '3.0.2' | |
| } | |
| } | |
| import twitter4j.* |
This file contains hidden or 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
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| } | |
| dependencies { | |
| classpath group: 'org.twitter4j', name: 'twitter4j-core', version: '3.0.2' | |
| } | |
| } | |
| import twitter4j.* |
This file contains hidden or 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 scalikejdbc._ | |
| import scalikejdbc.SQLInterpolation._ | |
| // load settings | |
| Class.forName("org.hsqldb.jdbc.JDBCDriver") | |
| ConnectionPool.singleton("jdbc:hsqldb:mem:test", "", "") | |
| GlobalSettings.loggingSQLAndTime = LoggingSQLAndTimeSettings(enabled = true, logLevel = 'info) | |
| implicit val session = AutoSession |
This file contains hidden or 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 foo | |
| import scala.language.experimental.macros | |
| import scala.reflect.macros._ | |
| object ExampleMacros { | |
| def selectDynamicImpl(c: Context)(name: c.Expr[String]): c.Expr[String] = { | |
| import c.universe._ | |
| val _name: String = c.eval(c.Expr[String](c.resetAllAttrs(name.tree.duplicate))) |